litellm-mirror/litellm/proxy
Krish Dholakia d121fc4775 fix(proxy/utils.py): auto-update if required view missing from db. raise warning for optional views. (#5675)
Prevents missing optional views from blocking proxy startup.
2024-09-12 22:15:44 -07:00
..
_experimental LiteLLM Minor Fixes and Improvements (11/09/2024) (#5634) 2024-09-11 22:36:06 -07:00
analytics_endpoints show correct key aliases on ui 2024-06-21 14:36:38 -07:00
auth LiteLLM Minor Fixes and Improvements (11/09/2024) (#5634) 2024-09-11 22:36:06 -07:00
common_utils fix otel test 2024-09-09 16:20:47 -07:00
config_management_endpoints feat(ui): for adding pass-through endpoints 2024-08-15 21:58:11 -07:00
db Refactor 'check_view_exists' logic (#5659) 2024-09-12 13:39:50 -07:00
example_config_yaml call spend logs endpoint 2024-08-30 16:35:07 -07:00
fine_tuning_endpoints use native endpoints 2024-08-03 16:52:43 -07:00
guardrails use get async httpx client 2024-09-10 13:08:49 -07:00
health_endpoints fix email health checks 2024-08-06 15:59:26 -07:00
hooks v0 add rerank on litellm proxy 2024-08-27 17:28:39 -07:00
management_endpoints LiteLLM Minor Fixes and Improvements (09/10/2024) (#5618) 2024-09-11 11:30:29 -07:00
management_helpers LiteLLM Minor Fixes and Improvements (09/07/2024) (#5580) 2024-09-09 18:54:17 -07:00
openai_files_endpoints feat(router.py): Support Loadbalancing batch azure api endpoints (#5469) 2024-09-02 21:32:55 -07:00
out bump: version 1.43.15 → 1.43.16 2024-08-15 23:04:30 -07:00
pass_through_endpoints LiteLLM Minor Fixes and Improvements (08/06/2024) (#5567) 2024-09-06 17:16:24 -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
rerank_endpoints v0 add rerank on litellm proxy 2024-08-27 17:28:39 -07:00
spend_tracking LiteLLM Minor Fixes and Improvements (11/09/2024) (#5634) 2024-09-11 22:36:06 -07:00
tests use chunk_processort 2024-09-02 15:51:52 -07:00
ui_crud_endpoints ui - add Create, get, delete endpoints for IP Addresses 2024-07-09 15:12:08 -07:00
vertex_ai_endpoints fix case when gemini is used 2024-09-10 17:06:45 -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 LiteLLM Minor Fixes and Improvements (09/10/2024) (#5618) 2024-09-11 11:30:29 -07:00
_super_secret_config.yaml docs(enterprise.md): cleanup docs 2024-07-15 14:52:08 -07:00
_types.py LiteLLM Minor Fixes and Improvements (11/09/2024) (#5634) 2024-09-11 22:36:06 -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 LiteLLM Minor fixes + improvements (08/04/2024) (#5505) 2024-09-04 22:16:55 -07:00
custom_callbacks1.py v0 add rerank on litellm proxy 2024-08-27 17:28:39 -07:00
custom_guardrail.py v0 add rerank on litellm proxy 2024-08-27 17:28:39 -07:00
custom_handler.py feat(proxy_server.py): support custom llm handler on proxy 2024-07-25 19:35:52 -07:00
enterprise
health_check.py LiteLLM Minor Fixes and Improvements (09/07/2024) (#5580) 2024-09-09 18:54:17 -07:00
lambda.py
litellm_pre_call_utils.py LiteLLM Minor Fixes and Improvements (11/09/2024) (#5634) 2024-09-11 22:36:06 -07:00
llamaguard_prompt.txt
logo.jpg
openapi.json
otel_config.yaml
post_call_rules.py
prisma_migration.py refactor secret managers 2024-09-03 10:58:02 -07:00
proxy_cli.py Add the option to specify a schema in the postgres DB, also modify docs (#5640) 2024-09-11 14:53:52 -07:00
proxy_config.yaml [Fix-Router] Don't cooldown when only 1 deployment exists (#5673) 2024-09-12 19:14:58 -07:00
proxy_server.py fix(proxy/utils.py): auto-update if required view missing from db. raise warning for optional views. (#5675) 2024-09-12 22:15:44 -07:00
README.md
route_llm_request.py v0 add rerank on litellm proxy 2024-08-27 17:28:39 -07:00
schema.prisma Refactor 'check_view_exists' logic (#5659) 2024-09-12 13:39:50 -07:00
start.sh
utils.py fix(proxy/utils.py): auto-update if required view missing from db. raise warning for optional views. (#5675) 2024-09-12 22:15:44 -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.