You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bug happened!
I am trying to get deepseek-chat to respond with a json format through litllm, getting:
litellm.exceptions.BadRequestError: litellm.BadRequestError: DeepseekException - Failed to deserialize the JSON body into the target type: response_format: response_format.type json_schema is unavailable now at line 1 column 1193
I'm using the following code to call deepseek through litellm:
class TopicSchema(BaseModel):
topic: str
subtopics: List[str]
class CurriculumSchema(BaseModel):
topics: List[TopicSchema]
What happened?
A bug happened!
I am trying to get deepseek-chat to respond with a json format through litllm, getting:
litellm.exceptions.BadRequestError: litellm.BadRequestError: DeepseekException - Failed to deserialize the JSON body into the target type: response_format: response_format.type
json_schema
is unavailable now at line 1 column 1193I'm using the following code to call deepseek through litellm:
class TopicSchema(BaseModel):
topic: str
subtopics: List[str]
class CurriculumSchema(BaseModel):
topics: List[TopicSchema]
prompt = settings.curriculum_prompt
response = completion(
model=settings.datagen_model,
messages=[
{"role": "system", "content": settings.teacher_role},
{"role": "user", "content": prompt},
],
response_format=CurriculumSchema,
temperature=0,
max_tokens=4096,
)
This code works with llama3.3, but not deepseek, although deepseek seems to have support for schemas:
https://api-docs.deepseek.com/guides/json_mode
Relevant log output
No response
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
1.57.0
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: