forked from phoenix/litellm-mirror
(docs) proxy server
This commit is contained in:
parent
adf7539be2
commit
c972e4acf2
1 changed files with 13 additions and 4 deletions
|
@ -185,6 +185,19 @@ $ litellm --model command-nightly
|
|||
|
||||
## Usage
|
||||
|
||||
#### Replace openai base
|
||||
|
||||
```python
|
||||
import openai
|
||||
|
||||
openai.api_base = "http://0.0.0.0:8000"
|
||||
|
||||
print(openai.ChatCompletion.create(model="test", messages=[{"role":"user", "content":"Hey!"}]))
|
||||
```
|
||||
|
||||
### Using with OpenAI compatible projects
|
||||
LiteLLM allows you to set `openai.api_base` to the proxy server and use all LiteLLM supported LLMs in any OpenAI supported project
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="lm-harness" label="LM-Harness Evals">
|
||||
This tutorial assumes you're using the `big-refactor` branch of LM Harness https://github.com/EleutherAI/lm-evaluation-harness/tree/big-refactor
|
||||
|
@ -323,10 +336,6 @@ print(result)
|
|||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
### [TUTORIAL] LM-Evaluation Harness with TGI
|
||||
|
||||
|
||||
## Advanced
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue