The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
add docstring for /embeddings and /completions
Ishaan Jaff2be984ebee8d
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.pyindex dbe2c97ec08..0607dae9dc2 100644--- a/litellm/proxy/proxy_server.py+++ b/litellm/proxy/proxy_server.py@@ -3294,6 +3294,24 @@ async def completion(model: Optional[str] = None,user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),):+ """+ Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`++ ```bash+ curl -X POST http://localhost:4000/v1/completions \++ -H "Content-Type: application/json" \++ -H "Authorization: Bearer sk-1234" \++ -d '{+ "model": "gpt-3.5-turbo-instruct",+ "prompt": "Once upon a time",+ "max_tokens": 50,+ "temperature": 0.7+ }'+ ```+ """global user_temperature, user_request_timeout, user_max_tokens, user_api_basedata = {}try:@@ -3500,6 +3518,23 @@ async def embeddings(model: Optional[str] = None,user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),):+ """+ Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings`++ ```bash+ curl -X POST http://localhost:4000/v1/embeddings \++ -H "Content-Type: application/json" \++ -H "Authorization: Bearer sk-1234" \++ -d '{+ "model": "text-embedding-ada-002",+ "input": "The quick brown fox jumps over the lazy dog"+ }'+ ```++"""global proxy_logging_objdata: Any = {}try: