Skip to content

Commit

Permalink
Merge pull request #955 from julep-ai/x/prompt-step-model-settings
Browse files Browse the repository at this point in the history
fix(agents-api): Fix None-valued `passed_settings` from overriding agent's settings in `prompt` step
  • Loading branch information
creatorrr authored Dec 13, 2024
2 parents 7ebeb6e + 02cd9f3 commit 7f5610d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agents-api/agents_api/activities/task_steps/prompt_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ async def prompt_step(context: StepContext) -> StepOutcome:
for message in prompt
]

# Remove None values from passed_settings (avoid overwriting agent's settings)
passed_settings = {k: v for k, v in passed_settings.items() if v is not None}

# Use litellm for other models
completion_data: dict = {
"model": agent_model,
Expand Down

0 comments on commit 7f5610d

Please sign in to comment.