-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be31e57
commit 8bbfa8c
Showing
26 changed files
with
293 additions
and
49 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
#api/models/user.py | ||
from datetime import date | ||
from pydantic import BaseModel | ||
|
||
class User(BaseModel): | ||
email: str | ||
first_name: str | ||
last_name: str | ||
last_name: str | ||
daily_flagship_usage: float = 0.0 | ||
daily_usage: float = 0.0 | ||
last_usage_update: date = None |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#api/utils/db_utils.py | ||
|
||
from motor.motor_asyncio import AsyncIOMotorClient | ||
from starlette.config import Config | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class LLMProvider: | ||
def __init__(self, model_name: str, model_provider: str, display_name: str, input_token_cost: float, output_token_cost: float, is_flagship: bool): | ||
self.model_name = model_name | ||
self.model_provider = model_provider | ||
self.display_name = display_name | ||
self.input_token_cost = input_token_cost | ||
self.output_token_cost = output_token_cost | ||
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), | ||
] |
Binary file modified
BIN
+501 Bytes
(120%)
api/utils/llm_providers/__pycache__/anthropic.cpython-311.pyc
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,33 @@ | ||
// app/llm_providers.tsx | ||
export const LLMProviders = [ | ||
{ | ||
model_name: "gpt-4-0125-preview", | ||
model_provider: "openai", | ||
display_name: "gpt-4 turbo", | ||
isFlagship: true, | ||
}, | ||
{ | ||
model_name: "gpt-3.5-turbo-0125", | ||
model_provider: "openai", | ||
display_name: "gpt-3.5 turbo", | ||
isFlagship: false, | ||
}, | ||
{ | ||
model_name: "claude-3-opus-20240229", | ||
model_provider: "anthropic", | ||
display_name: "claude 3 opus", | ||
isFlagship: true, | ||
}, | ||
{ | ||
model_name: "claude-3-sonnet-20240229", | ||
model_provider: "anthropic", | ||
display_name: "claude 3 sonnet", | ||
isFlagship: false, | ||
}, | ||
{ | ||
model_name: "claude-3-haiku-20240307", | ||
model_provider: "anthropic", | ||
display_name: "claude 3 haiku", | ||
isFlagship: false, | ||
}, | ||
]; | ||
]; |
Oops, something went wrong.