Giridhar Pathak
11/07/2025, 4:33 PMRobert Howell
11/07/2025, 6:40 PMRobert Howell
11/07/2025, 6:41 PMRobert Howell
11/07/2025, 6:44 PMimport daft
# import prompt from the daft.functions library
from daft.functions import prompt
# configure the provider to "openai" with OpenAI client options like base_url
daft.set_provider("openai", base_url="...")
df = daft.from_pydict({
"input": [
"What sound does a cat make?",
"What sound does a dog make?",
"What sound does a cow make?",
"What does the fox say?",
]
})
# generate responses using a chat model
df = df.with_column("response", prompt(df["input"], model="gpt-5-mini"))
Please let me know how this works for you. We recently published more documentation on these features. https://docs.daft.ai/en/stable/ai-functions/#structured-outputs-with-custom-openai-providerGiridhar Pathak
11/07/2025, 6:45 PMRobert Howell
11/07/2025, 6:46 PMGiridhar Pathak
11/07/2025, 6:46 PMjay
11/07/2025, 6:51 PMprompt now? I believe we might be at a good spot where we can do thisjay
11/07/2025, 6:52 PMRobert Howell
11/07/2025, 6:54 PM