Skip to content

Commit 4026297

Browse files
committed
update the compose file
Signed-off-by: Mustafa <mustafa.cetin@intel.com> initial Signed-off-by: Mustafa <mustafa.cetin@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> update for codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> add agents Signed-off-by: Mustafa <mustafa.cetin@intel.com> env updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> merged to main Signed-off-by: Mustafa <mustafa.cetin@intel.com> updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update the env variables Signed-off-by: Mustafa <mustafa.cetin@intel.com> update compose.yaml Signed-off-by: Mustafa <mustafa.cetin@intel.com> compose.yaml updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update readme file Signed-off-by: Mustafa <mustafa.cetin@intel.com> update readme Signed-off-by: Mustafa <mustafa.cetin@intel.com> Gradio UI for CodeGen (#4) * update the compose file Signed-off-by: Mustafa <mustafa.cetin@intel.com> initial Signed-off-by: Mustafa <mustafa.cetin@intel.com> added microservice ports Signed-off-by: okhleif-IL <omar.khleif@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> update for codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> Initial commit for Gradio UI Signed-off-by: okhleif-IL <omar.khleif@intel.com> New UI Signed-off-by: okhleif-IL <omar.khleif@intel.com> prepare for merge Signed-off-by: okhleif-IL <omar.khleif@intel.com> add agents Signed-off-by: Mustafa <mustafa.cetin@intel.com> env updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> merged to main Signed-off-by: Mustafa <mustafa.cetin@intel.com> updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> UI Updates Signed-off-by: okhleif-IL <omar.khleif@intel.com> added dockerfile Signed-off-by: okhleif-IL <omar.khleif@intel.com> removed files dataframe Signed-off-by: okhleif-IL <omar.khleif@intel.com> updated file upload Signed-off-by: okhleif-IL <omar.khleif@intel.com> added checkbox for agent Signed-off-by: okhleif-IL <omar.khleif@intel.com> key_index_name --> index_name Signed-off-by: okhleif-IL <omar.khleif@intel.com> added / removed print statements Signed-off-by: okhleif-IL <omar.khleif@intel.com> Support for data streaming (from Melanie) Signed-off-by: okhleif-IL <omar.khleif@intel.com> fixed file not supported bug Signed-off-by: okhleif-IL <omar.khleif@intel.com> added refresh button to index Signed-off-by: okhleif-IL <omar.khleif@intel.com> simplified README Signed-off-by: okhleif-IL <omar.khleif@intel.com> * updated readme and fixed merge Signed-off-by: okhleif-IL <omar.khleif@intel.com> * reverted changes Signed-off-by: okhleif-IL <omar.khleif@intel.com> --------- Signed-off-by: okhleif-IL <omar.khleif@intel.com> Co-authored-by: Mustafa <mustafa.cetin@intel.com> add cpu xeon test Signed-off-by: Mustafa <mustafa.cetin@intel.com> add cpu xeon test Signed-off-by: Mustafa <mustafa.cetin@intel.com> update gaudi test and compose Signed-off-by: Mustafa <mustafa.cetin@intel.com> update gaudi test and compose Signed-off-by: Mustafa <mustafa.cetin@intel.com> update gaudi compose Signed-off-by: Mustafa <mustafa.cetin@intel.com> update readme Signed-off-by: Mustafa <mustafa.cetin@intel.com> update readme Signed-off-by: Mustafa <mustafa.cetin@intel.com> ui changes after rebase (#6) * parent 580d33b author Mustafa <mustafa.cetin@intel.com> 1739513513 -0800 committer Mustafa <mustafa.cetin@intel.com> 1743715605 -0700 parent 580d33b author Mustafa <mustafa.cetin@intel.com> 1739513513 -0800 committer Mustafa <mustafa.cetin@intel.com> 1743714982 -0700 update the compose file Signed-off-by: Mustafa <mustafa.cetin@intel.com> initial Signed-off-by: Mustafa <mustafa.cetin@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> update for codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> add agents Signed-off-by: Mustafa <mustafa.cetin@intel.com> env updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> merged to main Signed-off-by: Mustafa <mustafa.cetin@intel.com> updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update the env variables Signed-off-by: Mustafa <mustafa.cetin@intel.com> update compose.yaml Signed-off-by: Mustafa <mustafa.cetin@intel.com> compose.yaml updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update readme Signed-off-by: Mustafa <mustafa.cetin@intel.com> update the compose file Signed-off-by: Mustafa <mustafa.cetin@intel.com> initial Signed-off-by: Mustafa <mustafa.cetin@intel.com> added microservice ports Signed-off-by: okhleif-IL <omar.khleif@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> update for codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> Initial commit for Gradio UI Signed-off-by: okhleif-IL <omar.khleif@intel.com> New UI Signed-off-by: okhleif-IL <omar.khleif@intel.com> prepare for merge Signed-off-by: okhleif-IL <omar.khleif@intel.com> add agents Signed-off-by: Mustafa <mustafa.cetin@intel.com> env updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> merged to main Signed-off-by: Mustafa <mustafa.cetin@intel.com> updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> UI Updates Signed-off-by: okhleif-IL <omar.khleif@intel.com> added dockerfile Signed-off-by: okhleif-IL <omar.khleif@intel.com> removed files dataframe Signed-off-by: okhleif-IL <omar.khleif@intel.com> updated file upload Signed-off-by: okhleif-IL <omar.khleif@intel.com> added checkbox for agent Signed-off-by: okhleif-IL <omar.khleif@intel.com> key_index_name --> index_name Signed-off-by: okhleif-IL <omar.khleif@intel.com> added / removed print statements Signed-off-by: okhleif-IL <omar.khleif@intel.com> Support for data streaming (from Melanie) Signed-off-by: okhleif-IL <omar.khleif@intel.com> fixed file not supported bug Signed-off-by: okhleif-IL <omar.khleif@intel.com> added refresh button to index Signed-off-by: okhleif-IL <omar.khleif@intel.com> simplified README Signed-off-by: okhleif-IL <omar.khleif@intel.com> updated readme and fixed merge Signed-off-by: okhleif-IL <omar.khleif@intel.com> reverted changes Signed-off-by: okhleif-IL <omar.khleif@intel.com> bug fixes and ui updates Signed-off-by: okhleif-IL <omar.khleif@intel.com> add cpu xeon test Signed-off-by: Mustafa <mustafa.cetin@intel.com> add cpu xeon test Signed-off-by: Mustafa <mustafa.cetin@intel.com> fixed output for index uses Signed-off-by: okhleif-IL <omar.khleif@intel.com> added services for gaudi Signed-off-by: okhleif-IL <omar.khleif@intel.com> update gaudi test and compose Signed-off-by: Mustafa <mustafa.cetin@intel.com> added error handling for exceeded token size Signed-off-by: okhleif-IL <omar.khleif@intel.com> update the compose file Signed-off-by: Mustafa <mustafa.cetin@intel.com> initial Signed-off-by: Mustafa <mustafa.cetin@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> update for codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> add agents Signed-off-by: Mustafa <mustafa.cetin@intel.com> env updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> merged to main Signed-off-by: Mustafa <mustafa.cetin@intel.com> updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update the env variables Signed-off-by: Mustafa <mustafa.cetin@intel.com> update compose.yaml Signed-off-by: Mustafa <mustafa.cetin@intel.com> compose.yaml updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update readme file Signed-off-by: Mustafa <mustafa.cetin@intel.com> update readme Signed-off-by: Mustafa <mustafa.cetin@intel.com> Gradio UI for CodeGen (#4) * update the compose file Signed-off-by: Mustafa <mustafa.cetin@intel.com> initial Signed-off-by: Mustafa <mustafa.cetin@intel.com> added microservice ports Signed-off-by: okhleif-IL <omar.khleif@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> update for codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> Initial commit for Gradio UI Signed-off-by: okhleif-IL <omar.khleif@intel.com> New UI Signed-off-by: okhleif-IL <omar.khleif@intel.com> prepare for merge Signed-off-by: okhleif-IL <omar.khleif@intel.com> add agents Signed-off-by: Mustafa <mustafa.cetin@intel.com> env updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> update codegen Signed-off-by: Mustafa <mustafa.cetin@intel.com> merged to main Signed-off-by: Mustafa <mustafa.cetin@intel.com> updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> UI Updates Signed-off-by: okhleif-IL <omar.khleif@intel.com> added dockerfile Signed-off-by: okhleif-IL <omar.khleif@intel.com> removed files dataframe Signed-off-by: okhleif-IL <omar.khleif@intel.com> updated file upload Signed-off-by: okhleif-IL <omar.khleif@intel.com> added checkbox for agent Signed-off-by: okhleif-IL <omar.khleif@intel.com> key_index_name --> index_name Signed-off-by: okhleif-IL <omar.khleif@intel.com> added / removed print statements Signed-off-by: okhleif-IL <omar.khleif@intel.com> Support for data streaming (from Melanie) Signed-off-by: okhleif-IL <omar.khleif@intel.com> fixed file not supported bug Signed-off-by: okhleif-IL <omar.khleif@intel.com> added refresh button to index Signed-off-by: okhleif-IL <omar.khleif@intel.com> simplified README Signed-off-by: okhleif-IL <omar.khleif@intel.com> * updated readme and fixed merge Signed-off-by: okhleif-IL <omar.khleif@intel.com> * reverted changes Signed-off-by: okhleif-IL <omar.khleif@intel.com> --------- Signed-off-by: okhleif-IL <omar.khleif@intel.com> Co-authored-by: Mustafa <mustafa.cetin@intel.com> add cpu xeon test Signed-off-by: Mustafa <mustafa.cetin@intel.com> add cpu xeon test Signed-off-by: Mustafa <mustafa.cetin@intel.com> codegen code cleaning Signed-off-by: Mustafa <mustafa.cetin@intel.com> xeon --> gaudi Signed-off-by: okhleif-IL <omar.khleif@intel.com> made tests like codegen ragagents branch Signed-off-by: okhleif-IL <omar.khleif@intel.com> added back \n Signed-off-by: okhleif-IL <omar.khleif@intel.com> * code updates Signed-off-by: Mustafa <mustafa.cetin@intel.com> --------- Signed-off-by: okhleif-IL <omar.khleif@intel.com> Signed-off-by: Mustafa <mustafa.cetin@intel.com> code udates for test-xeon Signed-off-by: Mustafa <mustafa.cetin@intel.com> update test files for gauidi Signed-off-by: Mustafa <mustafa.cetin@intel.com> Documentation Updates, Screenshots and Improvements (#7) * Improved README and added information Signed-off-by: okhleif-IL <omar.khleif@intel.com> * removed stray $ Signed-off-by: okhleif-IL <omar.khleif@intel.com> * renamed dummy file names Signed-off-by: okhleif-IL <omar.khleif@intel.com> * codegen_ui_gradio.py comment + print cleanup Signed-off-by: okhleif-IL <omar.khleif@intel.com> --------- Signed-off-by: okhleif-IL <omar.khleif@intel.com>
1 parent e8cdf7d commit 4026297

File tree

15 files changed

+1409
-208
lines changed

15 files changed

+1409
-208
lines changed

CodeGen/README.md

Lines changed: 66 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code Generation Application
22

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.
44

55
The capabilities of CodeGen LLMs include:
66

@@ -20,6 +20,7 @@ The workflow falls into the following architecture:
2020

2121
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.
2222

23+
2324
```mermaid
2425
---
2526
config:
@@ -28,7 +29,7 @@ config:
2829
rankSpacing: 100
2930
curve: linear
3031
themeVariables:
31-
fontSize: 50px
32+
fontSize: 25px
3233
---
3334
flowchart LR
3435
%% Colors %%
@@ -37,34 +38,56 @@ flowchart LR
3738
classDef orchid fill:#C26DBC,stroke:#ADD8E6,stroke-width:2px,fill-opacity:0.5
3839
classDef invisible fill:transparent,stroke:transparent;
3940
style CodeGen-MegaService stroke:#000000
40-
4141
%% Subgraphs %%
42-
subgraph CodeGen-MegaService["CodeGen MegaService "]
42+
subgraph CodeGen-MegaService["CodeGen-MegaService"]
4343
direction LR
44-
LLM([LLM MicroService]):::blue
44+
EM([Embedding<br>MicroService]):::blue
45+
RET([Retrieval<br>MicroService]):::blue
46+
RER([Agents]):::blue
47+
LLM([LLM<br>MicroService]):::blue
4548
end
46-
subgraph UserInterface[" User Interface "]
49+
subgraph User Interface
4750
direction LR
48-
a([User Input Query]):::orchid
49-
UI([UI server<br>]):::orchid
51+
a([Submit Query Tab]):::orchid
52+
UI([UI server]):::orchid
53+
Ingest([Manage Resources]):::orchid
5054
end
5155
56+
CLIP_EM{{Embedding<br>service}}
57+
VDB{{Vector DB}}
58+
V_RET{{Retriever<br>service}}
59+
Ingest{{Ingest data}}
60+
DP([Data Preparation]):::blue
61+
LLM_gen{{TGI Service}}
62+
GW([CodeGen GateWay]):::orange
5263
53-
LLM_gen{{LLM Service <br>}}
54-
GW([CodeGen GateWay<br>]):::orange
55-
64+
%% Data Preparation flow
65+
%% Ingest data flow
66+
direction LR
67+
Ingest[Ingest data] --> UI
68+
UI --> DP
69+
DP <-.-> CLIP_EM
5670
5771
%% Questions interaction
5872
direction LR
5973
a[User Input Query] --> UI
6074
UI --> GW
6175
GW <==> CodeGen-MegaService
76+
EM ==> RET
77+
RET ==> RER
78+
RER ==> LLM
6279
6380
6481
%% Embedding service flow
6582
direction LR
83+
EM <-.-> CLIP_EM
84+
RET <-.-> V_RET
6685
LLM <-.-> LLM_gen
6786
87+
direction TB
88+
%% Vector DB interaction
89+
V_RET <-.->VDB
90+
DP <-.->VDB
6891
```
6992

7093
## Deploy CodeGen Service
@@ -125,24 +148,43 @@ To set up environment variables for deploying ChatQnA services, follow these ste
125148

126149
#### Deploy CodeGen on Gaudi
127150

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:
129152

130153
```bash
131154
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
133165
```
134166

135167
Refer to the [Gaudi Guide](./docker_compose/intel/hpu/gaudi/README.md) to build docker images from source.
136168

137169
#### Deploy CodeGen on Xeon
138170

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:
140172

141173
```bash
142174
cd GenAIExamples/CodeGen/docker_compose/intel/cpu/xeon
143-
docker compose up -d
144175
```
145176

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+
146188
Refer to the [Xeon Guide](./docker_compose/intel/cpu/xeon/README.md) for more instructions on building docker images from source.
147189

148190
### Deploy CodeGen on Kubernetes using Helm Chart
@@ -161,6 +203,15 @@ Two ways of consuming CodeGen Service:
161203
-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."}'
162204
```
163205

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+
164215
2. Access via frontend
165216

166217
To access the frontend, open the following URL in your browser: http://{host_ip}:5173.

0 commit comments

Comments
 (0)