Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add latest claude 3.5 sonnet with visual interfaces support #459

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions refact_known_models/passthrough.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,15 @@
"pp1000t_generated": 600, # $0.60 / 1M tokens
"filter_caps": ["chat", "tools"],
},
"claude-3-5-sonnet-20241022": {
"backend": "litellm",
"provider": "anthropic",
"tokenizer_path": "Xenova/claude-tokenizer",
"resolve_as": "claude-3-5-sonnet-20241022",
"T": 200_000,
"T_out": 4096,
"pp1000t_prompt": 3_000, # $3.00 / 1M tokens (2024 oct)
"pp1000t_generated": 15_000, # $15.00 / 1M tokens (2024 oct)
"filter_caps": ["chat", "tools"],
},
}
1 change: 1 addition & 0 deletions refact_webgui/webgui/selfhost_fastapi_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ def _integrations_env_setup():
def _integrations_env_setup(env_var_name: str, api_key_name: str, api_enable_name: str):
os.environ[env_var_name] = integrations.get(api_key_name, "") if inference.get(api_enable_name, False) else ""

litellm.modify_params = True # NOTE: for Anthropic API
_integrations_env_setup("OPENAI_API_KEY", "openai_api_key", "openai_api_enable")
_integrations_env_setup("ANTHROPIC_API_KEY", "anthropic_api_key", "anthropic_api_enable")

Expand Down