Skip to content

Commit

Permalink
hotfix: Add claude-new and no-cache on debug
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Oct 26, 2024
1 parent 73e9977 commit daf8d92
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 6 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 @@ -9,6 +9,7 @@
from ...common.protocol.tasks import StepContext, StepOutcome
from ...common.storage_handler import auto_blob_store
from ...common.utils.template import render_template
from ...env import debug
from ...models.tools.list_tools import list_tools


Expand Down Expand Up @@ -87,8 +88,13 @@ async def prompt_step(context: StepContext) -> StepOutcome:
**passed_settings,
}

extra_body = { # OpenAI python accepts extra args in extra_body
"cache": {"no-cache": debug}, # will not return a cached response
}

response = await litellm.acompletion(
**completion_data,
extra_body=extra_body,
)

if context.current_step.unwrap:
Expand Down
5 changes: 2 additions & 3 deletions agents-api/agents_api/models/utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import inspect
import time
import re
import time
from functools import partialmethod, wraps
from typing import Any, Callable, ParamSpec, Type, TypeVar
from uuid import UUID

from fastapi import HTTPException

import pandas as pd
from fastapi import HTTPException
from pydantic import BaseModel

from ..common.utils.cozo import uuid_int_list_to_uuid4
Expand Down
8 changes: 7 additions & 1 deletion llm-proxy/litellm-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ model_list:
tags: ["paid"]

# Anthropic models
- model_name: "claude-3.5-sonnet"
- model_name: "claude-3.5-sonnet-20240620"
litellm_params:
model: "claude-3-5-sonnet-20240620"
tags: ["paid"]
api_key: os.environ/ANTHROPIC_API_KEY

- model_name: "claude-3.5-sonnet"
litellm_params:
model: "claude-3-5-sonnet-20241022"
tags: ["paid"]
api_key: os.environ/ANTHROPIC_API_KEY

- model_name: "claude-3-opus"
litellm_params:
model: "claude-3-opus-20240229"
Expand Down

0 comments on commit daf8d92

Please sign in to comment.