feat: bring back model_settings and remove validation again (#6104)
This commit is contained in:
committed by
Caren Thomas
parent
bd5f684346
commit
6eeb3c90bb
@@ -285,7 +285,9 @@ class Agent(SqlalchemyBase, OrganizationMixin, ProjectMixin, TemplateEntityMixin
|
||||
if resolver:
|
||||
state[field_name] = resolver()
|
||||
|
||||
state["model"] = self.llm_config._to_model() if self.llm_config else None
|
||||
state["model"] = self.llm_config.handle if self.llm_config else None
|
||||
state["model_settings"] = self.llm_config._to_model_settings() if self.llm_config else None
|
||||
state["embedding"] = self.embedding_config.handle if self.embedding_config else None
|
||||
|
||||
return self.__pydantic_model__(**state)
|
||||
|
||||
@@ -425,6 +427,8 @@ class Agent(SqlalchemyBase, OrganizationMixin, ProjectMixin, TemplateEntityMixin
|
||||
state["managed_group"] = multi_agent_group
|
||||
state["tool_exec_environment_variables"] = tool_exec_environment_variables
|
||||
state["secrets"] = tool_exec_environment_variables
|
||||
state["model"] = self.llm_config._to_model() if self.llm_config else None
|
||||
state["model"] = self.llm_config.handle if self.llm_config else None
|
||||
state["model_settings"] = self.llm_config._to_model_settings() if self.llm_config else None
|
||||
state["embedding"] = self.embedding_config.handle if self.embedding_config else None
|
||||
|
||||
return self.__pydantic_model__(**state)
|
||||
|
||||
Reference in New Issue
Block a user