diff --git a/api/utils/__pycache__/llm_provider_info.cpython-311.pyc b/api/utils/__pycache__/llm_provider_info.cpython-311.pyc index 3f1501e..eb2d6fe 100644 Binary files a/api/utils/__pycache__/llm_provider_info.cpython-311.pyc and b/api/utils/__pycache__/llm_provider_info.cpython-311.pyc differ diff --git a/api/utils/llm_provider_info.py b/api/utils/llm_provider_info.py index 2d17f5e..c0f216b 100644 --- a/api/utils/llm_provider_info.py +++ b/api/utils/llm_provider_info.py @@ -8,9 +8,9 @@ def __init__(self, model_name: str, model_provider: str, display_name: str, inpu self.is_flagship = is_flagship LLM_PROVIDERS = [ - LLMProvider("gpt-4-0125-preview", "openai", "gpt-4 turbo", 0.03 / 1000, 0.06 / 1000, True), - LLMProvider("gpt-3.5-turbo-0125", "openai", "gpt-3.5 turbo", 0.002 / 1000, 0.002 / 1000, False), - LLMProvider("claude-3-opus-20240229", "anthropic", "claude 3 opus", 0.02 / 1000, 0.04 / 1000, True), - LLMProvider("claude-3-sonnet-20240229", "anthropic", "claude 3 sonnet", 0.001 / 1000, 0.001 / 1000, False), - LLMProvider("claude-3-haiku-20240307", "anthropic", "claude 3 haiku", 0.001 / 1000, 0.001 / 1000, False), + LLMProvider("gpt-4-0125-preview", "openai", "gpt-4 turbo", 10 / 1000000, 30 / 1000000, True), + LLMProvider("gpt-3.5-turbo-0125", "openai", "gpt-3.5 turbo", 0.50 / 1000000, 1.50 / 1000000, False), + LLMProvider("claude-3-opus-20240229", "anthropic", "claude 3 opus", 15 / 1000000, 75 / 1000000, True), + LLMProvider("claude-3-sonnet-20240229", "anthropic", "claude 3 sonnet", 3 / 1000000, 15 / 1000000, False), + LLMProvider("claude-3-haiku-20240307", "anthropic", "claude 3 haiku", 0.25 / 1000000, 1.25 / 1000000, False), ] \ No newline at end of file diff --git a/api/utils/llm_providers/__pycache__/anthropic.cpython-311.pyc b/api/utils/llm_providers/__pycache__/anthropic.cpython-311.pyc index f82d613..8f6457f 100644 Binary files a/api/utils/llm_providers/__pycache__/anthropic.cpython-311.pyc and b/api/utils/llm_providers/__pycache__/anthropic.cpython-311.pyc differ diff --git a/api/utils/llm_providers/__pycache__/openai.cpython-311.pyc b/api/utils/llm_providers/__pycache__/openai.cpython-311.pyc index ee105d9..5c180ab 100644 Binary files a/api/utils/llm_providers/__pycache__/openai.cpython-311.pyc and b/api/utils/llm_providers/__pycache__/openai.cpython-311.pyc differ diff --git a/api/utils/llm_providers/anthropic.py b/api/utils/llm_providers/anthropic.py index 0facce5..28d12f4 100644 --- a/api/utils/llm_providers/anthropic.py +++ b/api/utils/llm_providers/anthropic.py @@ -17,7 +17,7 @@ async def anthropic_generate_response(conversation): stream = await client.messages.create( model=conversation.model.name, messages=messages, - max_tokens=1024, + max_tokens=1500, stream=True, ) diff --git a/api/utils/llm_providers/openai.py b/api/utils/llm_providers/openai.py index 7e94e17..3b5784e 100644 --- a/api/utils/llm_providers/openai.py +++ b/api/utils/llm_providers/openai.py @@ -19,6 +19,7 @@ async def openai_generate_response(conversation): input_tokens = sum(len(encoding.encode(message["content"])) for message in messages) stream = await client.chat.completions.create( + max_tokens=1500, model=conversation.model.name, messages=messages, stream=True,