litellm/litellm/proxy
2024-07-08 21:59:26 -07:00
..
_experimental docs(configs.md): add ip address filtering to docs 2024-07-08 21:59:26 -07:00
analytics_endpoints show correct key aliases on ui 2024-06-21 14:36:38 -07:00
auth feat(user_api_key_auth.py): allow restricting calls by IP address 2024-07-08 15:58:15 -07:00
common_utils fix - setting rpm/tpm 2024-07-08 07:43:00 -07:00
db
example_config_yaml
guardrails feat - control guardrails per api key 2024-07-05 19:39:07 -07:00
health_endpoints use ProxyErrorTypes, 2024-07-08 12:47:53 -07:00
hooks fix(presidio_pii_masking.py): fix presidio unset url check + add same check for langfuse 2024-07-06 17:50:55 -07:00
management_endpoints use ProxyErrorTypes, 2024-07-08 12:47:53 -07:00
management_helpers fix(utils.py): change update to upsert 2024-07-08 15:49:29 -06:00
pass_through_endpoints feat - setting up auth on pass through endpoint 2024-06-29 08:38:44 -07:00
proxy_load_test
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
__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(proxy_server.py): add license protection for 'allowed_ip' address feature 2024-07-08 16:04:44 -07:00
_super_secret_config.yaml fix(anthropic.py): fix anthropic tool calling + streaming 2024-07-04 16:30:24 -07:00
_types.py fix routes on assistants endpoints 2024-07-08 15:02:12 -07:00
.gitignore
admin_ui.py
cached_logo.jpg
caching_routes.py feat - refactor team endpoints 2024-06-15 11:40:36 -07:00
custom_callbacks1.py
custom_callbacks.py
enterprise
health_check.py
lambda.py
litellm_pre_call_utils.py track user_ip address per request 2024-07-08 09:00:08 -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 trace hierarchy on otel 2024-07-06 15:37:23 -07:00
proxy_server.py fix(proxy_server.py): add license protection for 'allowed_ip' address feature 2024-07-08 16:04:44 -07:00
README.md
schema.prisma SpendLogsPayload- track user ip 2024-07-08 10:16:58 -07:00
start.sh
utils.py fix(utils.py): cleanup 'additionalProperties=False' for tool calling with zod 2024-07-06 17:27:37 -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.