Skip to content

Commit 110ed24

Browse files
committed
Added readme
1 parent fe3c98d commit 110ed24

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@ model = LiteLLMModel(
6464
)
6565
```
6666

67-
2. Through direct initialization:
67+
Note: The environment variable prefix can be customized by passing an `env_prefix` parameter to the `LiteLLMModel` initialization. This allows you to use different models within the same application by setting different environment variables (e.g., `CUSTOM_PREFIX_COMPLETION_MODEL`).
6868

69-
# Or specify models directly
69+
2. Through specified model names:
7070

71+
```python
7172
model = LiteLLMModel(
72-
completion_model="gpt-3.5-turbo",
73-
embedding_model="text-embedding-ada-002",
74-
completion_params={"temperature": 0.7},
75-
embedding_params={"is_local": False} # Optional, defaults to False
73+
completion_model="gpt-3.5-turbo",
74+
embedding_model="text-embedding-ada-002",
75+
completion_params={"temperature": 0.7},
76+
embedding_params={"is_local": False} # Optional, defaults to False
7677
)
77-
78-
````
78+
```
7979

8080
Note: When using OpenAI models, you must set the `OPENAI_API_KEY` environment variable. For other providers, refer to the [LiteLLM documentation](https://github.com/BerriAI/litellm) for their specific API key requirements.
8181

@@ -93,7 +93,7 @@ response = model.complete([
9393
response = await model.acomplete([
9494
{"role": "user", "content": "What is the capital of France?"}
9595
])
96-
````
96+
```
9797

9898
#### Text Embedding
9999

0 commit comments

Comments
 (0)