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
docs: fix bad examples from sdk (#19322)
Harshit Jain99c4ba7adf8d
diff --git a/docs/my-website/docs/completion/token_usage.md b/docs/my-website/docs/completion/token_usage.mdindex 0bec6b3f902..d99564765a1 100644--- a/docs/my-website/docs/completion/token_usage.md+++ b/docs/my-website/docs/completion/token_usage.md@@ -100,7 +100,7 @@ from litellm import cost_per_tokenprompt_tokens = 5completion_tokens = 10-prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar = cost_per_token(model="gpt-3.5-turbo", prompt_tokens=prompt_tokens, completion_tokens=completion_tokens))+prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar = cost_per_token(model="gpt-3.5-turbo", prompt_tokens=prompt_tokens, completion_tokens=completion_tokens)print(prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar)```@@ -162,7 +162,7 @@ print(model_cost) # {'gpt-3.5-turbo': {'max_tokens': 4000, 'input_cost_per_token**Dictionary**```python-from litellm import register_model+import litellmlitellm.register_model({"gpt-4": {diff --git a/docs/my-website/docs/providers/openai/text_to_speech.md b/docs/my-website/docs/providers/openai/text_to_speech.mdindex a4aeb9e5257..f4507faa066 100644--- a/docs/my-website/docs/providers/openai/text_to_speech.md+++ b/docs/my-website/docs/providers/openai/text_to_speech.md@@ -46,7 +46,7 @@ os.environ["OPENAI_API_KEY"] = "sk-.."async def test_async_speech():speech_file_path = Path(__file__).parent / "speech.mp3"- response = await litellm.aspeech(+ response = await aspeech(model="openai/tts-1",voice="alloy",input="the quick brown fox jumped over the lazy dogs",diff --git a/docs/my-website/docs/text_to_speech.md b/docs/my-website/docs/text_to_speech.mdindex 77d15ccb3a5..667ffc925c1 100644--- a/docs/my-website/docs/text_to_speech.md+++ b/docs/my-website/docs/text_to_speech.md@@ -46,7 +46,7 @@ os.environ["OPENAI_API_KEY"] = "sk-.."async def test_async_speech():speech_file_path = Path(__file__).parent / "speech.mp3"- response = await litellm.aspeech(+ response = await aspeech(model="openai/tts-1",voice="alloy",input="the quick brown fox jumped over the lazy dogs",diff --git a/docs/my-website/src/pages/token_usage.md b/docs/my-website/src/pages/token_usage.mdindex 028e010a967..61deb61c94f 100644--- a/docs/my-website/src/pages/token_usage.md+++ b/docs/my-website/src/pages/token_usage.md@@ -27,7 +27,7 @@ from litellm import cost_per_tokenprompt_tokens = 5completion_tokens = 10-prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar = cost_per_token(model="gpt-3.5-turbo", prompt_tokens=prompt_tokens, completion_tokens=completion_tokens))+prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar = cost_per_token(model="gpt-3.5-turbo", prompt_tokens=prompt_tokens, completion_tokens=completion_tokens)print(prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar)```