Skip to content

Remove default temperature for ChatDatabricks #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 24, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class GetPopulation(BaseModel):
"""Name of Databricks Model Serving endpoint to query."""
target_uri: str = "databricks"
"""The target URI to use. Defaults to ``databricks``."""
temperature: float = 0.0
temperature: Optional[float] = None
"""Sampling temperature. Higher values make the model more creative."""
n: int = 1
"""The number of completion choices to generate."""
Expand Down Expand Up @@ -620,7 +620,7 @@ class AnswerWithJustification(BaseModel):
if method == "function_calling":
if schema is None:
raise ValueError(
"schema must be specified when method is 'function_calling'. " "Received None."
"schema must be specified when method is 'function_calling'. Received None."
)
tool_name = convert_to_openai_tool(schema)["function"]["name"]
llm = self.bind_tools([schema], tool_choice=tool_name)
Expand All @@ -641,7 +641,7 @@ class AnswerWithJustification(BaseModel):
elif method == "json_schema":
if schema is None:
raise ValueError(
"schema must be specified when method is 'json_schema'. " "Received None."
"schema must be specified when method is 'json_schema'. Received None."
)
response_format = {
"type": "json_schema",
Expand Down