Skip to content

Commit 65820a7

Browse files
authored
Fix llamaIndex docs (#974)
1 parent fac8ef1 commit 65820a7

File tree

1 file changed

+14
-1
lines changed
  • apps/opik-documentation/documentation/docs/tracing/integrations

1 file changed

+14
-1
lines changed

apps/opik-documentation/documentation/docs/tracing/integrations/llama_index.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ description: Describes how to track LlamaIndex pipelines using Opik
2626
To use the Opik integration with LlamaIndex, you'll need to have both the `opik` and `llama_index` packages installed. You can install them using pip:
2727

2828
```bash
29-
pip install opik llama-index llama-index-agent-openai llama-index-llms-openai
29+
pip install opik llama-index llama-index-agent-openai llama-index-llms-openai llama-index-callbacks-opik
3030
```
3131

3232
In addition, you can configure Opik using the `opik configure` command which will prompt you for the correct local server address or if you are using the Cloud platfrom your API key:
@@ -80,6 +80,19 @@ with open('./data/paul_graham/paul_graham_essay.txt', 'wb') as f:
8080
```
8181

8282
**Third step:**
83+
84+
Configure the OpenAI API key:
85+
86+
```python
87+
import os
88+
import getpass
89+
90+
if "OPENAI_API_KEY" not in os.environ:
91+
os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter your OpenAI API key: ")
92+
```
93+
94+
**Fourth step:**
95+
8396
We can now load the data, create an index and query engine:
8497

8598
```python

0 commit comments

Comments
 (0)