litellm/litellm/proxy
2024-07-15 18:18:50 -07:00
..
_experimental feat(proxy_server.py): return 'retry-after' param for rate limited requests 2024-07-13 17:15:20 -07:00
analytics_endpoints
auth test(test_pass_through_endpoints.py): add test for rpm limit support 2024-07-13 13:49:20 -07:00
common_utils fix show debugging utils on in mem usage 2024-07-15 10:05:57 -07:00
db
example_config_yaml test- otel span recording 2024-07-11 08:47:16 -07:00
guardrails feat(guardrails.py): allow setting logging_only in guardrails_config for presidio pii masking integration 2024-07-13 12:22:17 -07:00
health_endpoints Shorter success callbacks from /health/readiness 2024-07-10 18:45:42 -07:00
hooks feat(proxy_server.py): return 'retry-after' param for rate limited requests 2024-07-13 17:15:20 -07:00
management_endpoints use wrapper on /user endpoints 2024-07-13 12:29:15 -07:00
management_helpers delete updated / deleted values from cache 2024-07-13 13:16:57 -07:00
openai_files_endpoints add file content 2024-07-10 16:15:43 -07:00
pass_through_endpoints fix(pass_through_endpoints.py): fix client init 2024-07-13 14:46:56 -07:00
proxy_load_test
queue
secret_managers fix(aws_secret_manager.py): fix litellm license check 2024-07-03 22:07:48 -07:00
spend_tracking SpendLogsPayload- track user ip 2024-07-08 10:16:58 -07:00
tests test - pass through langfuse requests 2024-06-28 17:28:21 -07:00
ui_crud_endpoints ui - add Create, get, delete endpoints for IP Addresses 2024-07-09 15:12:08 -07:00
__init__.py
_logging.py
_new_secret_config.yaml docs(enterprise.md): cleanup docs 2024-07-15 14:52:08 -07:00
_super_secret_config.yaml docs(enterprise.md): cleanup docs 2024-07-15 14:52:08 -07:00
_types.py feat(proxy_server.py): return 'retry-after' param for rate limited requests 2024-07-13 17:15:20 -07:00
.gitignore
admin_ui.py
cached_logo.jpg
caching_routes.py
custom_callbacks1.py fix: fix linting errors 2024-07-13 14:39:42 -07:00
custom_callbacks.py
enterprise
health_check.py
lambda.py
litellm_pre_call_utils.py feat - support /create assistants endpoint 2024-07-09 10:03:47 -07:00
llamaguard_prompt.txt
logo.jpg
openapi.json
otel_config.yaml
post_call_rules.py
prisma_migration.py fix(prisma_migration.py): support decrypting variables in a python script 2024-06-28 16:31:37 -07:00
proxy_cli.py fix(proxy_cli.py): bump default azure api version 2024-07-08 16:28:22 -07:00
proxy_config.yaml fix supports vision 2024-07-11 12:59:42 -07:00
proxy_server.py fix(utils.py): update get_model_info docstring 2024-07-15 18:18:50 -07:00
README.md
schema.prisma SpendLogsPayload- track user ip 2024-07-08 10:16:58 -07:00
start.sh
utils.py fix only use per request tracking if slack alerting is being used 2024-07-13 18:01:53 -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.