You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/generative-apis/reference-content/integrating-generative-apis-with-popular-tools.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,12 +75,12 @@ LangChain is a popular library for building AI applications. Scaleway's Generati
75
75
## LlamaIndex (advanced RAG applications)
76
76
77
77
LlamaIndex is an open-source framework for building Large Language Models (LLMs) based applications, especially optimizing RAG (Retrieval Augmented Generation) pipelines.
78
-
To use the LlamaIndex framework with Scaleway's Generative APIs, first install the required dependencies:
78
+
1. Install the required dependencies to use the LlamaIndex framework with Scaleway's Generative APIs:
79
79
```bash
80
80
pip install llama-index-llms-openai-like
81
81
```
82
82
83
-
Then, create a file `main.py` and add the following code to it to configure the `OpenAILike` client and your secret key:
83
+
2. Create a file `main.py` and add the following code to it to configure the `OpenAILike` client and your secret key:
84
84
```python
85
85
from llama_index.llms.openai_like import OpenAILike
86
86
from llama_index.core.llms import ChatMessage
@@ -99,13 +99,13 @@ llm = OpenAILike(
99
99
Make sure to replace `<API secret key>` with your actual API key.
100
100
</Message>
101
101
102
-
You can then interact with the LLM by sending messages to the model with the following code:
102
+
3.You can then interact with the LLM by sending messages to the model with the following code:
103
103
```python
104
104
response = llm.chat([ChatMessage("Could you tell me about Scaleway please ?")])
0 commit comments