Skip to content

Commit

Permalink
Merge branch 'main' into deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed May 13, 2024
2 parents 747f983 + 38c3146 commit 064efd9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 28 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ requires-python = ">=3.10,<3.13"
readme = "README.md"
license = { text = "MIT" }
dependencies = [
"fastapi~=0.110.3",
"fastapi>=0.111.0",
"uvicorn[standard]~=0.29.0",
"promplate[all]~=0.3.4.4",
"promplate-trace[langfuse,langsmith]==0.3.0dev2",
"python-box~=7.1.1",
"pydantic-settings~=2.2.1",
"httpx[http2]~=0.27.0",
"promptools[stream,validation]~=0.1.3.2",
"promptools[stream,validation]~=0.1.3.3",
"fake-useragent~=1.5.1",
"html2text~=2024.2.26",
"beautifulsoup4~=4.12.3",
"rich~=13.7.1",
"zhipuai~=2.0.1",
"anthropic~=0.25.7",
"dashscope~=1.17.1",
"anthropic~=0.25.8",
"dashscope~=1.19.0",
]

[tool.pdm.dev-dependencies]
Expand Down
25 changes: 1 addition & 24 deletions src/routes/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ..logic.tools import tool_map
from ..utils.config import env
from ..utils.http import forward_headers
from ..utils.llm import find_llm, groq, openai
from ..utils.llm import Model, find_llm, groq, openai
from .sse import non_duplicated_event_stream

run_router = APIRouter(tags=["call"])
Expand All @@ -24,29 +24,6 @@ class Msg(BaseModel):
name: Annotated[Literal.__getitem__(tuple(tool_map)), str] | None = None # type: ignore


Model = Literal[
"gpt-3.5-turbo-0301",
"gpt-3.5-turbo-0613",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-4-1106-preview",
"gpt-4-0125-preview",
"gpt-4-turbo-2024-04-09",
"chatglm_turbo",
"claude-3-haiku-20240307",
"gemma-7b-it",
"llama3-8b-8192",
"llama3-70b-8192",
"llama2-70b-4096",
"mixtral-8x7b-32768",
"nous-hermes-2-mixtral-8x7b-dpo",
"qwen-turbo",
"abab5.5s-chat",
"abab5.5-chat",
"abab6-chat",
]


run_config_fields = {"model", "temperature", "stop", "stop_sequences"}


Expand Down
22 changes: 22 additions & 0 deletions src/utils/llm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Literal

from .anthropic import anthropic
from .chatglm import glm
from .dispatch import find_llm
Expand All @@ -6,3 +8,23 @@
from .octoai import octoai
from .openai import openai
from .qwen import qwen

Model = Literal[
"gpt-3.5-turbo-0125",
"gpt-4o-2024-05-13",
"gpt-4-1106-preview",
"gpt-4-0125-preview",
"gpt-4-turbo-2024-04-09",
"chatglm_turbo",
"claude-3-haiku-20240307",
"gemma-7b-it",
"llama3-8b-8192",
"llama3-70b-8192",
"llama2-70b-4096",
"mixtral-8x7b-32768",
"nous-hermes-2-mixtral-8x7b-dpo",
"qwen-turbo",
"abab5.5s-chat",
"abab5.5-chat",
"abab6-chat",
]

0 comments on commit 064efd9

Please sign in to comment.