mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
docs using proxy with context caaching anthropic
This commit is contained in:
parent
2267b8a59f
commit
912acb1cae
1 changed files with 29 additions and 0 deletions
|
|
@ -272,6 +272,16 @@ response = await litellm.acompletion(
|
|||
</TabItem>
|
||||
<TabItem value="proxy" label="LiteLLM Proxy">
|
||||
|
||||
:::info
|
||||
|
||||
LiteLLM Proxy is OpenAI compatible
|
||||
|
||||
This is an example using the OpenAI Python SDK sending a request to LiteLLM Proxy
|
||||
|
||||
Assuming you have a model=`anthropic/claude-3-5-sonnet-20240620` on the [litellm proxy config.yaml](#usage-with-litellm-proxy)
|
||||
|
||||
:::
|
||||
|
||||
```python
|
||||
import openai
|
||||
client = openai.AsyncOpenAI(
|
||||
|
|
@ -358,6 +368,16 @@ response = await litellm.acompletion(
|
|||
</TabItem>
|
||||
<TabItem value="proxy" label="LiteLLM Proxy">
|
||||
|
||||
:::info
|
||||
|
||||
LiteLLM Proxy is OpenAI compatible
|
||||
|
||||
This is an example using the OpenAI Python SDK sending a request to LiteLLM Proxy
|
||||
|
||||
Assuming you have a model=`anthropic/claude-3-5-sonnet-20240620` on the [litellm proxy config.yaml](#usage-with-litellm-proxy)
|
||||
|
||||
:::
|
||||
|
||||
```python
|
||||
import openai
|
||||
client = openai.AsyncOpenAI(
|
||||
|
|
@ -465,6 +485,15 @@ response = await litellm.acompletion(
|
|||
</TabItem>
|
||||
<TabItem value="proxy" label="LiteLLM Proxy">
|
||||
|
||||
:::info
|
||||
|
||||
LiteLLM Proxy is OpenAI compatible
|
||||
|
||||
This is an example using the OpenAI Python SDK sending a request to LiteLLM Proxy
|
||||
|
||||
Assuming you have a model=`anthropic/claude-3-5-sonnet-20240620` on the [litellm proxy config.yaml](#usage-with-litellm-proxy)
|
||||
|
||||
:::
|
||||
|
||||
```python
|
||||
import openai
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue