litellm-mirror/litellm/proxy
2024-06-28 16:03:56 -07:00
..
_experimental fix(add-exception-mapping-+-langfuse-exception-logging-for-streaming-exceptions): add exception mapping + langfuse exception logging for streaming exceptions 2024-06-22 21:26:15 -07:00
analytics_endpoints show correct key aliases on ui 2024-06-21 14:36:38 -07:00
auth fix only use crypto imports when needed 2024-06-25 16:28:47 -07:00
common_utils feat - add debug_utils 2024-06-22 16:12:42 -07:00
db
example_config_yaml feat(bedrock_httpx.py): moves to using httpx client for bedrock cohere calls 2024-05-11 13:43:08 -07:00
health_endpoints add options for /health/readiness and liveliness 2024-06-19 12:13:35 -07:00
hooks docs(team_budgets.md): fix script 2024-06-22 15:42:05 -07:00
management_endpoints fix(key_management_endpoints.py): use common _duration_in_seconds function 2024-06-20 17:02:31 -07:00
management_helpers feat - refactor team endpoints 2024-06-15 11:40:36 -07:00
proxy_load_test (fix) locust load test use uuid 2024-03-25 15:36:30 -07:00
queue docs(scheduler.md): add request prioritization to docs 2024-05-31 19:35:47 -07:00
secret_managers fix(proxy_cli.py): run aws kms decrypt before starting proxy server 2024-06-28 16:03:56 -07:00
spend_tracking fix cost tracking for whisper 2024-06-26 14:21:57 -07:00
tests doc - OTEL trace propogation 2024-06-11 14:25:33 -07:00
.gitignore
__init__.py
_logging.py fix(_logging.py): fix timestamp format for json logs 2024-06-20 15:20:21 -07:00
_new_secret_config.yaml fix(router.py): improve error message returned for fallbacks 2024-06-25 11:27:20 -07:00
_super_secret_config.yaml fix(predibase.py): support json schema on predibase 2024-06-25 16:03:47 -07:00
_types.py feat - refactor /spend/calculate 2024-06-24 19:05:34 -07:00
admin_ui.py
cached_logo.jpg
caching_routes.py feat - refactor team endpoints 2024-06-15 11:40:36 -07:00
custom_callbacks.py
custom_callbacks1.py feat - async_post_call_streaming_hook 2024-05-23 09:30:53 -07:00
enterprise
health_check.py test - /health endpoints 2024-04-13 10:09:18 -07:00
lambda.py
litellm_pre_call_utils.py forward otel traceparent in request headers 2024-06-26 12:31:28 -07:00
llamaguard_prompt.txt
logo.jpg
openapi.json
otel_config.yaml
post_call_rules.py
proxy_cli.py fix(proxy_cli.py): run aws kms decrypt before starting proxy server 2024-06-28 16:03:56 -07:00
proxy_config.yaml test secret detection 2024-06-25 17:27:02 -07:00
proxy_server.py init secret detection callback 2024-06-25 16:25:14 -07:00
README.md
schema.prisma Merge pull request #4084 from BerriAI/litellm_batch_add_team_members 2024-06-10 20:26:35 -07:00
start.sh
utils.py Merge branch 'main' into litellm_dynamic_tpm_limits 2024-06-22 19:14:59 -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.