litellm/litellm/proxy
2024-05-30 16:37:19 -07:00
..
_experimental ui new build 2024-05-29 21:11:09 -07:00
auth fix literal usage 2024-05-30 14:28:53 -07:00
db (feat) stop eagerly evaluating fstring 2024-03-25 09:01:42 -07:00
example_config_yaml feat(bedrock_httpx.py): moves to using httpx client for bedrock cohere calls 2024-05-11 13:43:08 -07:00
hooks fix(parallel_request_limiter.py): fix user+team tpm/rpm limit check 2024-05-27 08:48:23 -07:00
proxy_load_test (fix) locust load test use uuid 2024-03-25 15:36:30 -07:00
queue
secret_managers fix(utils.py): initial commit for aws secret manager support 2024-03-16 14:37:46 -07:00
tests test -base64 cache hits 2024-04-10 16:46:56 -07:00
__init__.py
_logging.py feat(proxy_cli.py): support json logs on proxy 2024-05-20 09:18:12 -07:00
_new_secret_config.yaml fix(langfuse.py): fix langfuse environ check 2024-04-24 13:21:00 -07:00
_super_secret_config.yaml fix(router.py): cooldown on 404 errors 2024-05-30 10:57:38 -07:00
_types.py use proxy_admin_viewer, and internal_user_viewer 2024-05-30 16:37:19 -07:00
.gitignore
admin_ui.py
cached_logo.jpg
custom_callbacks1.py feat - async_post_call_streaming_hook 2024-05-23 09:30:53 -07:00
custom_callbacks.py
enterprise
health_check.py test - /health endpoints 2024-04-13 10:09:18 -07:00
lambda.py
llamaguard_prompt.txt
logo.jpg
openapi.json
otel_config.yaml
post_call_rules.py
proxy_cli.py fix(proxy_cli.py): enable json logging via litellm_settings param on config 2024-05-29 21:41:20 -07:00
proxy_config.yaml feat - async_post_call_streaming_hook 2024-05-23 09:30:53 -07:00
proxy_server.py fix ui_get_available_role 2024-05-30 16:12:41 -07:00
README.md
schema.prisma feat(proxy_server.py): allow admin to invite users via invite link 2024-05-27 20:32:25 -07:00
start.sh
utils.py fix migrate to LitellmUserRoles 2024-05-30 13:57:50 -07:00

litellm-proxy

A local, fast, and lightweight OpenAI-compatible server to call 100+ LLM APIs.

usage

$ pip install litellm
$ litellm --model ollama/codellama 

#INFO: Ollama running on http://0.0.0.0:8000

replace openai base

import openai # openai v1.0.0+
client = openai.OpenAI(api_key="anything",base_url="http://0.0.0.0:8000") # set proxy to base_url
# request sent to model set on litellm proxy, `litellm --model`
response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [
    {
        "role": "user",
        "content": "this is a test request, write a short poem"
    }
])

print(response)

See how to call Huggingface,Bedrock,TogetherAI,Anthropic, etc.