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: CodeGen/README.md
+66-15Lines changed: 66 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Code Generation Application
2
2
3
-
Code Generation (CodeGen) Large Language Models (LLMs) are specialized AI models designed for the task of generating computer code. Such models undergo training with datasets that encompass repositories, specialized documentation, programming code, relevant web content, and other related data. They possess a deep understanding of various programming languages, coding patterns, and software development concepts. CodeGen LLMs are engineered to assist developers and programmers. When these LLMs are seamlessly integrated into the developer's Integrated Development Environment (IDE), they possess a comprehensive understanding of the coding context, which includes elements such as comments, function names, and variable names. This contextual awareness empowers them to provide more refined and contextually relevant coding suggestions.
3
+
Code Generation (CodeGen) Large Language Models (LLMs) are specialized AI models designed for the task of generating computer code. Such models undergo training with datasets that encompass repositories, specialized documentation, programming code, relevant web content, and other related data. They possess a deep understanding of various programming languages, coding patterns, and software development concepts. CodeGen LLMs are engineered to assist developers and programmers. When these LLMs are seamlessly integrated into the developer's Integrated Development Environment (IDE), they possess a comprehensive understanding of the coding context, which includes elements such as comments, function names, and variable names. This contextual awareness empowers them to provide more refined and contextually relevant coding suggestions. Additionally Retrieval-Augmented Generation (RAG) and Agents are parts of the CodeGen example which provide an additional layer of intelligence and adaptability, ensuring that the generated code is not only relevant but also accurate, efficient, and tailored to the specific needs of the developers and programmers.
4
4
5
5
The capabilities of CodeGen LLMs include:
6
6
@@ -20,6 +20,7 @@ The workflow falls into the following architecture:
20
20
21
21
The CodeGen example is implemented using the component-level microservices defined in [GenAIComps](https://github.com/opea-project/GenAIComps). The flow chart below shows the information flow between different microservices for this example.
@@ -125,24 +148,43 @@ To set up environment variables for deploying ChatQnA services, follow these ste
125
148
126
149
#### Deploy CodeGen on Gaudi
127
150
128
-
Find the corresponding [compose.yaml](./docker_compose/intel/hpu/gaudi/compose.yaml).
151
+
Find the corresponding [compose.yaml](./docker_compose/intel/hpu/gaudi/compose.yaml). User could start CodeGen based on TGI or vLLM service:
129
152
130
153
```bash
131
154
cd GenAIExamples/CodeGen/docker_compose/intel/hpu/gaudi
132
-
docker compose up -d
155
+
```
156
+
157
+
TGI service:
158
+
```bash
159
+
docker compose --profile codegen-xeon-tgi up -d
160
+
```
161
+
162
+
vLLM service:
163
+
```bash
164
+
docker compose --profile codegen-xeon-vllm up -d
133
165
```
134
166
135
167
Refer to the [Gaudi Guide](./docker_compose/intel/hpu/gaudi/README.md) to build docker images from source.
136
168
137
169
#### Deploy CodeGen on Xeon
138
170
139
-
Find the corresponding [compose.yaml](./docker_compose/intel/cpu/xeon/compose.yaml).
171
+
Find the corresponding [compose.yaml](./docker_compose/intel/cpu/xeon/compose.yaml). User could start CodeGen based on TGI or vLLM service:
140
172
141
173
```bash
142
174
cd GenAIExamples/CodeGen/docker_compose/intel/cpu/xeon
143
-
docker compose up -d
144
175
```
145
176
177
+
TGI service:
178
+
```bash
179
+
docker compose --profile codegen-xeon-tgi up -d
180
+
```
181
+
182
+
vLLM service:
183
+
```bash
184
+
docker compose --profile codegen-xeon-vllm up -d
185
+
```
186
+
187
+
146
188
Refer to the [Xeon Guide](./docker_compose/intel/cpu/xeon/README.md) for more instructions on building docker images from source.
147
189
148
190
### Deploy CodeGen on Kubernetes using Helm Chart
@@ -161,6 +203,15 @@ Two ways of consuming CodeGen Service:
161
203
-d '{"messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."}'
162
204
```
163
205
206
+
If the user wants a CodeGen service with RAG and Agents based on dedicated documentation.
207
+
208
+
```bash
209
+
curl http://localhost:7778/v1/codegen \
210
+
-H "Content-Type: application/json" \
211
+
-d '{"agents_flag": "True", "index_name": "my_API_document", "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."}'
212
+
213
+
```
214
+
164
215
2. Access via frontend
165
216
166
217
To access the frontend, open the following URL in your browser: http://{host_ip}:5173.
0 commit comments