error display

This commit is contained in:
philschmid
2025-06-18 12:17:50 +00:00
parent e44ee7e7cb
commit 6dab27bf19
4 changed files with 33 additions and 9 deletions

View File

@@ -16,14 +16,14 @@ class Configuration(BaseModel):
)
reflection_model: str = Field(
default="gemini-2.5-flash-preview-04-17",
default="gemini-2.5-flash",
metadata={
"description": "The name of the language model to use for the agent's reflection."
},
)
answer_model: str = Field(
default="gemini-2.5-pro-preview-05-06",
default="gemini-2.5-pro",
metadata={
"description": "The name of the language model to use for the agent's answer."
},

View File

@@ -153,7 +153,7 @@ def reflection(state: OverallState, config: RunnableConfig) -> ReflectionState:
configurable = Configuration.from_runnable_config(config)
# Increment the research loop count and get the reasoning model
state["research_loop_count"] = state.get("research_loop_count", 0) + 1
reasoning_model = state.get("reasoning_model") or configurable.reasoning_model
reasoning_model = state.get("reasoning_model", configurable.reflection_model)
# Format the prompt
current_date = get_current_date()
@@ -231,7 +231,7 @@ def finalize_answer(state: OverallState, config: RunnableConfig):
Dictionary with state update, including running_summary key containing the formatted final summary with sources
"""
configurable = Configuration.from_runnable_config(config)
reasoning_model = state.get("reasoning_model") or configurable.reasoning_model
reasoning_model = state.get("reasoning_model") or configurable.answer_model
# Format the prompt
current_date = get_current_date()