Skip to content

Commit

Permalink
Add Codegen example for GMC (#60)
Browse files Browse the repository at this point in the history
* add codegen example for GMC

Signed-off-by: KfreeZ <kefei.zhang@intel.com>

* move chatQnA resource to chatqa namespace

Signed-off-by: KfreeZ <kefei.zhang@intel.com>

---------

Signed-off-by: KfreeZ <kefei.zhang@intel.com>
Co-authored-by: Steve Zhang <huailong.zhang@intel.com>
  • Loading branch information
KfreeZ and Steve Zhang authored May 31, 2024
1 parent 019272a commit bc9c2bd
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 23 deletions.
46 changes: 23 additions & 23 deletions microservices-connector/config/samples/chatQnA_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ metadata:
app.kubernetes.io/name: gmconnector
app.kubernetes.io/managed-by: kustomize
name: chatqa
namespace: gmcsample
namespace: chatqa
spec:
routerConfig:
name: router
nameSpace: gmcsample
nameSpace: chatqa
serviceName: router-service
config:
no_proxy: ".gmcsample.svc.cluster.local"
no_proxy: ".chatqa.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
nodes:
Expand All @@ -24,20 +24,20 @@ spec:
steps:
- name: Embedding
internalService:
nameSpace: gmcsample
nameSpace: chatqa
serviceName: embedding-service
config:
no_proxy: ".gmcsample.svc.cluster.local"
no_proxy: ".chatqa.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
tei_endpoint: "http://tei-embedding-service.gmcsample.svc.cluster.local:6006"
tei_endpoint: "http://tei-embedding-service.chatqa.svc.cluster.local:6006"
endpoint: /v1/embeddings
- name: TeiEmbedding
internalService:
nameSpace: gmcsample
nameSpace: chatqa
serviceName: tei-embedding-service
config:
no_proxy: ".gmcsample.svc.cluster.local"
no_proxy: ".chatqa.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
gmcTokenSecret: gmc-tokens
Expand All @@ -48,39 +48,39 @@ spec:
- name: Retriever
data: $response
internalService:
nameSpace: gmcsample
nameSpace: chatqa
serviceName: retriever-redis-server
config:
no_proxy: ".gmcsample.svc.cluster.local"
no_proxy: ".chatqa.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
RedisUrl: redis://redis-vector-db.gmcsample.svc.cluster.local:6379
RedisUrl: redis://redis-vector-db.chatqa.svc.cluster.local:6379
IndexName: rag-redis
tei_endpoint: "http://tei-embedding-service.gmcsample.svc.cluster.local:6006"
tei_endpoint: "http://tei-embedding-service.chatqa.svc.cluster.local:6006"
endpoint: /v1/retrieval
- name: VectorDB
internalService:
nameSpace: gmcsample
nameSpace: chatqa
serviceName: redis-vector-db
isDownstreamService: true
- name: Reranking
data: $response
internalService:
nameSpace: gmcsample
nameSpace: chatqa
serviceName: reranking-service
config:
no_proxy: ".gmcsample.svc.cluster.local"
no_proxy: ".chatqa.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
tei_reranking_endpoint: http://tei-reranking-service.gmcsample.svc.cluster.local:8808
tei_reranking_endpoint: http://tei-reranking-service.chatqa.svc.cluster.local:8808
gmcTokenSecret: gmc-tokens
endpoint: /v1/reranking
- name: TeiReranking
internalService:
nameSpace: gmcsample
nameSpace: chatqa
serviceName: tei-reranking-service
config:
no_proxy: ".gmcsample.svc.cluster.local"
no_proxy: ".chatqa.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
gmcTokenSecret: gmc-tokens
Expand All @@ -91,21 +91,21 @@ spec:
- name: Llm
data: $response
internalService:
nameSpace: gmcsample
nameSpace: chatqa
serviceName: llm-service
config:
no_proxy: "tgi-service.gmcsample.svc.cluster.local"
no_proxy: ".chatqa.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
tgi_endpoint: http://tgi-service.gmcsample.svc.cluster.local:9009
tgi_endpoint: http://tgi-service.chatqa.svc.cluster.local:9009
gmcTokenSecret: gmc-tokens
endpoint: /v1/chat/completions
- name: Tgi
internalService:
nameSpace: gmcsample
nameSpace: chatqa
serviceName: tgi-service
config:
no_proxy: "tgi-service.gmcsample.svc.cluster.local"
no_proxy: ".chatqa.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
gmcTokenSecret: gmc-tokens
Expand Down
49 changes: 49 additions & 0 deletions microservices-connector/config/samples/codegen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

apiVersion: gmc.opea.io/v1alpha3
kind: GMConnector
metadata:
labels:
app.kubernetes.io/name: gmconnector
app.kubernetes.io/managed-by: kustomize
name: codegen
namespace: codegen
spec:
routerConfig:
name: router
nameSpace: codegen
serviceName: router-service
config:
no_proxy: ".codegen.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
nodes:
root:
routerType: Sequence
steps:
- name: Llm
data: $response
internalService:
nameSpace: codegen
serviceName: llm-service
config:
no_proxy: ".codegen.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
tgi_endpoint: http://tgi-service.codegen.svc.cluster.local:9009
gmcTokenSecret: gmc-tokens
endpoint: /v1/chat/completions
- name: Tgi
internalService:
nameSpace: codegen
serviceName: tgi-service
config:
no_proxy: ".codegen.svc.cluster.local"
http_proxy: http://child-jf.intel.com:912
https_proxy: http://child-jf.intel.com:912
gmcTokenSecret: gmc-tokens
hostPath: /root/GMC/data/tgi
modelId: ise-uiuc/Magicoder-S-DS-6.7B
endpoint: /generate
isDownstreamService: true

0 comments on commit bc9c2bd

Please sign in to comment.