{“payload”:{“allShortcutsEnabled”:false,”fileTree”:{“cookbook/proxy-server”:{“items”:[{“name”:”Dockerfile”,”path”:”cookbook/proxy-server/Dockerfile”,”contentType”:”file”},{“name”:”LICENSE”,”path”:”cookbook/proxy-server/LICENSE”,”contentType”:”file”},{“name”:”main.py”,”path”:”cookbook/proxy-server/main.py”,”contentType”:”file”},{“name”:”models_info.json”,”path”:”cookbook/proxy-server/models_info.json”,”contentType”:”file”},{“name”:”readme.md”,”path”:”cookbook/proxy-server/readme.md”,”contentType”:”file”},{“name”:”requirements.txt”,”path”:”cookbook/proxy-server/requirements.txt”,”contentType”:”file”},{“name”:”test_proxy.py”,”path”:”cookbook/proxy-server/test_proxy.py”,”contentType”:”file”}],”totalCount”:7},”cookbook”:{“items”:[{“name”:”community-resources”,”path”:”cookbook/community-resources”,”contentType”:”directory”},{“name”:”proxy-server”,”path”:”cookbook/proxy-server”,”contentType”:”directory”},{“name”:”Claude_(Anthropic)_with_Streaming_liteLLM_Examples.ipynb”,”path”:”cookbook/Claude_(Anthropic)_with_Streaming_liteLLM_Examples.ipynb”,”contentType”:”file”},{“name”:”TogetherAI_liteLLM.ipynb”,”path”:”cookbook/TogetherAI_liteLLM.ipynb”,”contentType”:”file”},{“name”:”liteLLM_ChromaDB_Cache.ipynb”,”path”:”cookbook/liteLLM_ChromaDB_Cache.ipynb”,”contentType”:”file”},{“name”:”liteLLM_Hugging_Face_Example.ipynb”,”path”:”cookbook/liteLLM_Hugging_Face_Example.ipynb”,”contentType”:”file”},{“name”:”liteLLM_Replicate_Demo.ipynb”,”path”:”cookbook/liteLLM_Replicate_Demo.ipynb”,”contentType”:”file”},{“name”:”liteLLM_Streaming_Demo.ipynb”,”path”:”cookbook/liteLLM_Streaming_Demo.ipynb”,”contentType”:”file”},{“name”:”liteLLM_VertextAI_Example.ipynb”,”path”:”cookbook/liteLLM_VertextAI_Example.ipynb”,”contentType”:”file”},{“name”:”liteLLM_function_calling.ipynb”,”path”:”cookbook/liteLLM_function_calling.ipynb”,”contentType”:”file”},{“name”:”litellm_test_multiple_llm_demo.ipynb”,”path”:”cookbook/litellm_test_multiple_llm_demo.ipynb”,”contentType”:”file”}],”totalCount”:11},””:{“items”:[{“name”:”.circleci”,”path”:”.circleci”,”contentType”:”directory”},{“name”:”cookbook”,”path”:”cookbook”,”contentType”:”directory”},{“name”:”docs”,”path”:”docs”,”contentType”:”directory”},{“name”:”litellm”,”path”:”litellm”,”contentType”:”directory”},{“name”:”test-results”,”path”:”test-results”,”contentType”:”directory”},{“name”:”.DS_Store”,”path”:”.DS_Store”,”contentType”:”file”},{“name”:”.env.example”,”path”:”.env.example”,”contentType”:”file”},{“name”:”.gitignore”,”path”:”.gitignore”,”contentType”:”file”},{“name”:”.readthedocs.yaml”,”path”:”.readthedocs.yaml”,”contentType”:”file”},{“name”:”LICENSE”,”path”:”LICENSE”,”contentType”:”file”},{“name”:”README.md”,”path”:”README.md”,”contentType”:”file”},{“name”:”mkdocs.yml”,”path”:”mkdocs.yml”,”contentType”:”file”},{“name”:”poetry.lock”,”path”:”poetry.lock”,”contentType”:”file”},{“name”:”pyproject.toml”,”path”:”pyproject.toml”,”contentType”:”file”}],”totalCount”:14}},”fileTreeProcessingTime”:6.652907,”foldersToFetch”:[],”reducedMotionEnabled”:null,”repo”:{“id”:671269505,”defaultBranch”:”main”,”name”:”litellm”,”ownerLogin”:”BerriAI”,”currentUserCanPush”:false,”isFork”:false,”isEmpty”:false,”createdAt”:”2023-07-27T00:09:52.000Z”,”ownerAvatar”:”https://avatars.githubusercontent.com/u/121462774?v=4″,”public”:true,”private”:false,”isOrgOwned”:true},”symbolsExpanded”:false,”treeExpanded”:true,”refInfo”:{“name”:”main”,”listCacheKey”:”v0:1691718945.0″,”canEdit”:false,”refType”:”branch”,”currentOid”:”80d77fed7123af22201158528feadb83ab9a95bc”},”path”:”cookbook/proxy-server/readme.md”,”currentUser”:null,”blob”:{“rawLines”:null,”stylingDirectives”:null,”csv”:null,”csvError”:null,”dependabotInfo”:{“showConfigurationBanner”:false,”configFilePath”:null,”networkDependabotPath”:”/BerriAI/litellm/network/updates”,”dismissConfigurationNoticePath”:”/settings/dismiss-notice/dependabot_configuration_notice”,”configurationNoticeDismissed”:null,”repoAlertsPath”:”/BerriAI/litellm/security/dependabot”,”repoSecurityAndAnalysisPath”:”/BerriAI/litellm/settings/security_analysis”,”repoOwnerIsOrg”:true,”currentUserCanAdminRepo”:false},”displayName”:”readme.md”,”displayUrl”:”https://github.com/BerriAI/litellm/blob/main/cookbook/proxy-server/readme.md?raw=true”,”headerInfo”:{“blobSize”:”5.82 KB”,”deleteInfo”:{“deleteTooltip”:”You must be signed in to make or propose changes”},”editInfo”:{“editTooltip”:”You must be signed in to make or propose changes”},”ghDesktopPath”:”https://desktop.github.com”,”gitLfsPath”:null,”onBranch”:true,”shortPath”:”e0a0ad6″,”siteNavLoginPath”:”/login?return_to=https%3A%2F%2Fgithub.com%2FBerriAI%2Flitellm%2Fblob%2Fmain%2Fcookbook%2Fproxy-server%2Freadme.md”,”isCSV”:false,”isRichtext”:true,”toc”:[{“level”:1,”text”:”liteLLM Proxy Server: 50+ LLM Models, Error Handling, Caching”,”anchor”:”litellm-proxy-server-50-llm-models-error-handling-caching”,”htmlText”:”liteLLM Proxy Server: 50+ LLM Models, Error Handling, Caching”},{“level”:3,”text”:”Azure, Llama2, OpenAI, Claude, Hugging Face, Replicate Models”,”anchor”:”azure-llama2-openai-claude-hugging-face-replicate-models”,”htmlText”:”Azure, Llama2, OpenAI, Claude, Hugging Face, Replicate Models”},{“level”:2,”text”:”What does liteLLM proxy do”,”anchor”:”what-does-litellm-proxy-do”,”htmlText”:”What does liteLLM proxy do”},{“level”:2,”text”:”API Endpoints”,”anchor”:”api-endpoints”,”htmlText”:”API Endpoints”},{“level”:3,”text”:”/chat/completions (POST)”,”anchor”:”chatcompletions-post”,”htmlText”:”/chat/completions (POST)”},{“level”:4,”text”:”Input”,”anchor”:”input”,”htmlText”:”Input”},{“level”:4,”text”:”Example JSON body”,”anchor”:”example-json-body”,”htmlText”:”Example JSON body”},{“level”:3,”text”:”Making an API request to the Proxy Server”,”anchor”:”making-an-api-request-to-the-proxy-server”,”htmlText”:”Making an API request to the Proxy Server”},{“level”:3,”text”:”Output [Response Format]”,”anchor”:”output-response-format”,”htmlText”:”Output [Response Format]”},{“level”:2,”text”:”Installation & Usage”,”anchor”:”installation–usage”,”htmlText”:”Installation & Usage”},{“level”:3,”text”:”Running Locally”,”anchor”:”running-locally”,”htmlText”:”Running Locally”},{“level”:2,”text”:”Deploying”,”anchor”:”deploying”,”htmlText”:”Deploying”},{“level”:1,”text”:”Support / Talk with founders”,”anchor”:”support–talk-with-founders”,”htmlText”:”Support / Talk with founders”}],”lineInfo”:{“truncatedLoc”:”158″,”truncatedSloc”:”130″},”mode”:”file”},”image”:false,”isCodeownersFile”:null,”isPlain”:false,”isValidLegacyIssueTemplate”:false,”issueTemplateHelpUrl”:”https://docs.github.com/articles/about-issue-and-pull-request-templates”,”issueTemplate”:null,”discussionTemplate”:null,”language”:”Markdown”,”languageID”:222,”large”:false,”loggedIn”:false,”newDiscussionPath”:”/BerriAI/litellm/discussions/new”,”newIssuePath”:”/BerriAI/litellm/issues/new”,”planSupportInfo”:{“repoIsFork”:null,”repoOwnedByCurrentUser”:null,”requestFullPath”:”/BerriAI/litellm/blob/main/cookbook/proxy-server/readme.md”,”showFreeOrgGatedFeatureMessage”:null,”showPlanSupportBanner”:null,”upgradeDataAttributes”:null,”upgradePath”:null},”publishBannersInfo”:{“dismissActionNoticePath”:”/settings/dismiss-notice/publish_action_from_dockerfile”,”dismissStackNoticePath”:”/settings/dismiss-notice/publish_stack_from_file”,”releasePath”:”/BerriAI/litellm/releases/new?marketplace=true”,”showPublishActionBanner”:false,”showPublishStackBanner”:false},”renderImageOrRaw”:false,”richText”:”
Azure, Llama2, OpenAI, Claude, Hugging Face, Replicate Models
n
n
n
What does liteLLM proxy do
n
- n
- n
Make
/chat/completions
requests for 50+ LLM models Azure, OpenAI, Replicate, Anthropic, Hugging Facen
Example: for
model
useclaude-2
,gpt-3.5
,gpt-4
,command-nightly
,stabilityai/stablecode-completion-alpha-3b-4k
n
{n "model": "replicate/llama-2-70b-chat:2c1608e18606fad2812020dc541930f2d0495ce32eee50074220b87300bc16e1",n