Skip to content

missing "name" for ChatDatabricks.with_structured_output(method="json_schema")Β #211

@WIll-Xu35

Description

@WIll-Xu35

Hi,

When using ChatDatabricks.with_structured_output(method="json_schema"), there is this error:

{
  "external_model_provider":"openai",
  "external_model_error": {
    "error":{
      "message":"Missing required parameter: 'response_format.json_schema.name'.",
      "type":"invalid_request_error",
      "param":"response_format.json_schema.name",
      "code":"missing_required_parameter"
    }
  }
}

The problem is within this code block:
https://github.com/databricks/databricks-ai-bridge/blob/main/integrations/langchain/src/databricks_langchain/chat_models.py#L973

"response_format" should have another key named "name", per GPT's request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions