client.chat.completions.create: how to add response_format #29577
jsmith173
announced in
Ask Dosu (Archived)
Replies: 1 comment
-
To add the response = client.chat.completions.create(
model=self.config['model_actual'],
messages=self.messages,
stream=stream,
n=1,
frequency_penalty=0,
presence_penalty=0,
seed=12345,
top_p=0.1,
max_tokens=max_tokens,
response_format={"type": "json_object"}
) This sets the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Please extend the call with response_format. I want JSON only.
Beta Was this translation helpful? Give feedback.
All reactions