SynapseML version
1.1.1
System information
- Language version (e.g. python 3.8, scala 2.12):
- Spark Version (e.g. 3.2.3): 3.5
- Spark Platform (e.g. Synapse, Databricks): Fabric runtime 1.3
Describe the problem
Error running the provided example code due to setPromptCol
Code to reproduce issue
https://learn.microsoft.com/en-us/fabric/data-science/ai-services/how-to-use-openai-synapse-ml
from synapse.ml.services.openai import OpenAIPrompt
# Create a DataFrame with prompts
df = spark.createDataFrame([
("Explain quantum computing in simple terms.",),
("What are the benefits of exercise?",),
("Describe the water cycle.",)
]).toDF("prompt")
# Configure OpenAIPrompt with chat_completions API
prompt_completion = (
OpenAIPrompt()
.setDeploymentName("gpt-4.1")
.setApiType("chat_completions") # Accepts "chat_completions" or "responses"
.setPromptCol("prompt")
.setUsageCol("usage") # Track token usage
.setOutputCol("completions")
)
# Transform and display results
display(prompt_completion.transform(df).select("prompt", "completions", "usage"))
Other info / logs
'OpenAIPrompt' object has no attribute 'setPromptCol'
What component(s) does this bug affect?
What language(s) does this bug affect?
What integration(s) does this bug affect?
SynapseML version
1.1.1
System information
Describe the problem
Error running the provided example code due to setPromptCol
Code to reproduce issue
https://learn.microsoft.com/en-us/fabric/data-science/ai-services/how-to-use-openai-synapse-ml
Other info / logs
What component(s) does this bug affect?
area/cognitive: Cognitive projectarea/core: Core projectarea/deep-learning: DeepLearning projectarea/lightgbm: Lightgbm projectarea/opencv: Opencv projectarea/vw: VW projectarea/website: Websitearea/build: Project build systemarea/notebooks: Samples under notebooks folderarea/docker: Docker usagearea/models: models related issueWhat language(s) does this bug affect?
language/scala: Scala source codelanguage/python: Pyspark APIslanguage/r: R APIslanguage/csharp: .NET APIslanguage/new: Proposals for new client languagesWhat integration(s) does this bug affect?
integrations/synapse: Azure Synapse integrationsintegrations/azureml: Azure ML integrationsintegrations/databricks: Databricks integrations