set temperature param on all initialize_llm calls
This commit is contained in:
parent
d54203b819
commit
7598d42cf9
|
|
@ -368,6 +368,7 @@ def main():
|
||||||
_global_memory["config"]["model"] = args.model
|
_global_memory["config"]["model"] = args.model
|
||||||
_global_memory["config"]["expert_provider"] = args.expert_provider
|
_global_memory["config"]["expert_provider"] = args.expert_provider
|
||||||
_global_memory["config"]["expert_model"] = args.expert_model
|
_global_memory["config"]["expert_model"] = args.expert_model
|
||||||
|
_global_memory["config"]["temperature"] = args.temperature
|
||||||
|
|
||||||
# Create chat agent with appropriate tools
|
# Create chat agent with appropriate tools
|
||||||
chat_agent = create_agent(
|
chat_agent = create_agent(
|
||||||
|
|
@ -437,6 +438,9 @@ def main():
|
||||||
)
|
)
|
||||||
_global_memory["config"]["research_model"] = args.research_model or args.model
|
_global_memory["config"]["research_model"] = args.research_model or args.model
|
||||||
|
|
||||||
|
# Store temperature in global config
|
||||||
|
_global_memory["config"]["temperature"] = args.temperature
|
||||||
|
|
||||||
# Run research stage
|
# Run research stage
|
||||||
print_stage_header("Research Stage")
|
print_stage_header("Research Stage")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ def request_research(query: str) -> ResearchResult:
|
||||||
model = initialize_llm(
|
model = initialize_llm(
|
||||||
config.get("provider", "anthropic"),
|
config.get("provider", "anthropic"),
|
||||||
config.get("model", "claude-3-5-sonnet-20241022"),
|
config.get("model", "claude-3-5-sonnet-20241022"),
|
||||||
|
temperature=config.get("temperature"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check recursion depth
|
# Check recursion depth
|
||||||
|
|
@ -120,6 +121,7 @@ def request_web_research(query: str) -> ResearchResult:
|
||||||
model = initialize_llm(
|
model = initialize_llm(
|
||||||
config.get("provider", "anthropic"),
|
config.get("provider", "anthropic"),
|
||||||
config.get("model", "claude-3-5-sonnet-20241022"),
|
config.get("model", "claude-3-5-sonnet-20241022"),
|
||||||
|
temperature=config.get("temperature"),
|
||||||
)
|
)
|
||||||
|
|
||||||
success = True
|
success = True
|
||||||
|
|
@ -188,6 +190,7 @@ def request_research_and_implementation(query: str) -> Dict[str, Any]:
|
||||||
model = initialize_llm(
|
model = initialize_llm(
|
||||||
config.get("provider", "anthropic"),
|
config.get("provider", "anthropic"),
|
||||||
config.get("model", "claude-3-5-sonnet-20241022"),
|
config.get("model", "claude-3-5-sonnet-20241022"),
|
||||||
|
temperature=config.get("temperature"),
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -258,6 +261,7 @@ def request_task_implementation(task_spec: str) -> Dict[str, Any]:
|
||||||
model = initialize_llm(
|
model = initialize_llm(
|
||||||
config.get("provider", "anthropic"),
|
config.get("provider", "anthropic"),
|
||||||
config.get("model", "claude-3-5-sonnet-20241022"),
|
config.get("model", "claude-3-5-sonnet-20241022"),
|
||||||
|
temperature=config.get("temperature"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Get required parameters
|
# Get required parameters
|
||||||
|
|
@ -334,6 +338,7 @@ def request_implementation(task_spec: str) -> Dict[str, Any]:
|
||||||
model = initialize_llm(
|
model = initialize_llm(
|
||||||
config.get("provider", "anthropic"),
|
config.get("provider", "anthropic"),
|
||||||
config.get("model", "claude-3-5-sonnet-20241022"),
|
config.get("model", "claude-3-5-sonnet-20241022"),
|
||||||
|
temperature=config.get("temperature"),
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -118,8 +118,6 @@ def run_programming_task(
|
||||||
# Log the programming task
|
# Log the programming task
|
||||||
log_work_event(f"Executed programming task: {_truncate_for_log(instructions)}")
|
log_work_event(f"Executed programming task: {_truncate_for_log(instructions)}")
|
||||||
|
|
||||||
print(repr(result))
|
|
||||||
|
|
||||||
# Return structured output
|
# Return structured output
|
||||||
return {
|
return {
|
||||||
"output": truncate_output(result[0].decode()) if result[0] else "",
|
"output": truncate_output(result[0].decode()) if result[0] else "",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue