litellm-mirror/litellm/proxy
2024-07-18 12:44:30 -07:00
..
_experimental fix(team_endpoints.py): check if key belongs to team before returning /team/info 2024-07-16 21:43:17 -07:00
analytics_endpoints show correct key aliases on ui 2024-06-21 14:36:38 -07:00
auth fix check if user passed custom header 2024-07-16 21:43:17 -07:00
common_utils feat(aporio_ai.py): support aporio ai prompt injection for chat completion requests 2024-07-17 16:38:47 -07:00
db (feat) stop eagerly evaluating fstring 2024-03-25 09:01:42 -07:00
example_config_yaml test- otel span recording 2024-07-11 08:47:16 -07:00
guardrails Add enabled_roles to Guardrails configuration, Update Lakera guardrail moderation hook 2024-07-16 01:52:08 -07:00
health_endpoints feat(proxy): support hiding health check details 2024-07-18 17:21:12 +02:00
hooks feat(aporio_ai.py): support aporio ai prompt injection for chat completion requests 2024-07-17 16:38:47 -07:00
management_endpoints fix(test_key_generate_prisma.py): pass user_api_key_dict to test call 2024-07-17 08:29:21 -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 (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(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
.gitignore fix(gitmodules): remapping to new proxy 2023-10-12 21:23:53 -07:00
__init__.py refactor: add black formatting 2023-12-25 14:11:20 +05:30
_logging.py fix(_logging.py): fix timestamp format for json logs 2024-06-20 15:20:21 -07:00
_new_secret_config.yaml Merge branch 'main' into litellm_aporio_integration 2024-07-17 22:14:29 -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
admin_ui.py (feat) use cli args to start streamlit 2024-01-23 15:58:14 -08:00
cached_logo.jpg (feat) use hosted images for custom branding 2024-02-22 14:51:40 -08:00
caching_routes.py feat - refactor team endpoints 2024-06-15 11:40:36 -07:00
custom_callbacks.py (feat) fix custom handler bug 2024-02-28 14:48:55 -08:00
custom_callbacks1.py fix: fix linting errors 2024-07-13 14:39:42 -07:00
enterprise feat(llama_guard.py): add llama guard support for content moderation + new async_moderation_hook endpoint 2024-02-17 19:13:04 -08:00
health_check.py feat(proxy): support hiding health check details 2024-07-18 17:21:12 +02:00
lambda.py Add mangum. 2023-11-23 00:04:47 -05:00
litellm_pre_call_utils.py fix pre call utils on embedding 2024-07-17 18:29:34 -07:00
llamaguard_prompt.txt feat(llama_guard.py): allow user to define custom unsafe content categories 2024-02-17 17:42:47 -08:00
logo.jpg (feat) admin ui custom branding 2024-02-21 17:34:42 -08:00
openapi.json (feat) add swagger.json for litellm proxy 2023-10-13 20:41:04 -07:00
otel_config.yaml (feat) proxy: otel logging 2023-12-01 21:04:08 -08:00
post_call_rules.py (docs) add example post call rules to proxy 2024-01-15 20:58:50 -08:00
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 test langmsith logging 2024-07-17 10:08:29 -07:00
proxy_server.py Merge branch 'main' into litellm_run_moderation_check_on_embedding 2024-07-18 12:44:30 -07:00
README.md (docs) update readme proxy server 2023-11-17 17:40:44 -08:00
schema.prisma SpendLogsPayload- track user ip 2024-07-08 10:16:58 -07:00
start.sh fix(factory.py): fixing llama-2 non-chat models prompt templating 2023-11-07 21:33:54 -08:00
utils.py fix calculate correct alerting threshold 2024-07-16 21:43:17 -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.