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
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ The following table compares AI tools and libraries supported by Scaleway's Gene
21
21
| --- | --- | --- | --- |
22
22
|[OpenAI client](#openai-client-libraries)| Popular AI library for natural language processing | Text generation, language translation, text summarization | Low |
23
23
|[LangChain](#langchain-rag-and-llm-applications)| Library for building AI applications | Inference, embeddings, document indexing and retrieval | Medium |
24
+
|[LlamaIndex](#llamaindex-data-framework)| Framework for building powerful LLM (Large Language Model) applications | Knowledge graph building, document retrieval, data indexing | Medium |
|[cURL/Python](#custom-http-integrations)| Direct HTTP API calls for custom integrations | Custom applications, data processing | High |
26
27
@@ -71,6 +72,46 @@ LangChain is a popular library for building AI applications. Scaleway's Generati
71
72
-[Implementing Retrieval-Augmented Generation (RAG) with LangChain and Scaleway Generative APIs](/tutorials/how-to-implement-rag-generativeapis/)
72
73
</Message>
73
74
75
+
## LlamaIndex data framework
76
+
77
+
LlamaIndex is an open source is a data framework for building Large Language Models (LLMs) based application. To get started, you'll need to install the LlamaIndex and set up your API key.
78
+
79
+
### Configuration
80
+
81
+
To use the LlamaIndex framework with Scaleway's Generative APIs, first install the required dependencies:
82
+
83
+
```bash
84
+
pip install llama-index-llms-openai-like
85
+
```
86
+
87
+
Then set the API key and base URL in your OpenAILike-compatible client:
88
+
89
+
```python
90
+
from llama_index.llms.openai_like import OpenAILike
91
+
92
+
llm = OpenAILike(
93
+
model="pixtral-12b-2409",
94
+
api_key="<API secret key>",
95
+
api_base="https://api.scaleway.ai/v1",
96
+
max_tokens=512,
97
+
temperature=0.7,
98
+
top_p=1,
99
+
presence_penalty=0,
100
+
)
101
+
```
102
+
<Messagetype="tip">
103
+
Make sure to replace `<API secret key>` with your actual API key.
104
+
</Message>
105
+
106
+
### Using LlamaIndex client to chat with the LLM
107
+
108
+
```python
109
+
response = llm.chat([ChatMessage("could you tell about Scaleway please")])
110
+
print(response)
111
+
```
112
+
113
+
114
+
74
115
## Continue Dev (AI coding assistance)
75
116
76
117
Continue Dev is a library that provides AI-powered coding assistance. Scaleway's Generative APIs support Continue Dev for code completion and more.
0 commit comments