Skip to content

Commit 08bcaf1

Browse files
Add Google Gemini Use Case Template (#513)
* Add gemini template * Update template metadata with the Google Gemini template * Rename RAG-Powered Slack Assistant Using Gemini and Milvus.yaml to RAG-Powered Slack Assistant Using Google Gemini and Milvus * Create instructions for RAG-Powered Slack Assistant template Added instructions for using the RAG-Powered Slack Assistant with Google Gemini and Milvus. * Rename RAG-Powered Slack Assistant Using Google Gemini and Milvus to RAG-Powered Slack Assistant Using Google Gemini and Milvus.yaml * Add Transcripts Summary Gemini UseCase * Add instructions file for Gemini UseCase * Update template-metadata.json * Update Daily Meeting Summary Generator Using Google Gemini and Email Notifications_instructions.md * Update and rename Daily Meeting Summary Generator Using Google Gemini and Email Notifications.yaml to Send a daily email notification that summarizes the meetings using Google Gemini.yaml * Update link in daily email notification instructions * Update and rename RAG-Powered Slack Assistant Using Google Gemini and Milvus.yaml to RAG-powered Slack knowledge assistant using Google Gemini and Milvus.yaml * Update and rename RAG-Powered Slack Assistant Using Google Gemini and Milvus_instructions.md to RAG-powered Slack knowledge assistant using Google Gemini and Milvus * Rename RAG-powered Slack knowledge assistant using Google Gemini and Milvus to RAG-powered Slack knowledge assistant using Google Gemini and Milvus_instructions.md * Update RAG-powered Slack knowledge assistant using Google Gemini and Milvus_instructions.md * Update Send a daily email notification that summarizes the meetings using Google Gemini_instructions.md * Update template-metadata.json * Corrections --------- Co-authored-by: Deepak Ayilliath <[email protected]>
1 parent 11a34f7 commit 08bcaf1

5 files changed

+587
-1
lines changed
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
$integration: http://ibm.com/appconnect/integration/v2/integrationFile
2+
integration:
3+
type: trigger-action
4+
trigger-interfaces:
5+
trigger-interface-1:
6+
type: event-trigger
7+
connector-type: slack
8+
triggers:
9+
CREATED:
10+
assembly:
11+
$ref: '#/integration/assemblies/assembly-1'
12+
input-context:
13+
data: RawMessage
14+
options:
15+
webhookURLSuffix: uU4G8iFpR0iShb_KMOFOF0fRhRbK6azsvxMP7lSR3NAopK2rEQ6jJQEyqA0HfheE
16+
connectorServiceOptions:
17+
httpMethod: post
18+
path: resources/RawMessage/operations/CREATED/subscribe
19+
action: created
20+
action-interfaces:
21+
action-interface-1:
22+
type: api-action
23+
business-object: message
24+
connector-type: slack
25+
actions:
26+
CREATE: {}
27+
options:
28+
connectorServiceOptions:
29+
httpMethod: post
30+
path: resources/{OBJECT_NAME}/{OBJECT_ID}/message
31+
action: create
32+
action-interface-2:
33+
type: api-action
34+
business-object: Text embeddings
35+
connector-type: googlegemini
36+
actions:
37+
postEmbedContent: {}
38+
options:
39+
connectorServiceOptions:
40+
httpMethod: post
41+
path: resources/Text%20embeddings/operations/postEmbedContent
42+
action: custom
43+
action-interface-3:
44+
type: api-action
45+
business-object: Vectors
46+
connector-type: milvus
47+
actions:
48+
searchVector: {}
49+
options:
50+
connectorServiceOptions:
51+
httpMethod: post
52+
path: >-
53+
resources/Databases/{dbName}/Collections/{collectionName}/Vectors/operations/searchVector
54+
action: custom
55+
action-interface-4:
56+
type: api-action
57+
business-object: Text generation
58+
connector-type: googlegemini
59+
actions:
60+
postGenerateTextByModelId: {}
61+
options:
62+
connectorServiceOptions:
63+
httpMethod: post
64+
path: resources/Text%20generation/operations/postGenerateTextByModelId
65+
action: custom
66+
assemblies:
67+
assembly-1:
68+
assembly:
69+
execute:
70+
- custom-action:
71+
name: Google Gemini Generate embeddings
72+
target:
73+
$ref: '#/integration/action-interfaces/action-interface-2'
74+
action: postEmbedContent
75+
map:
76+
mappings:
77+
- content:
78+
mappings:
79+
- parts:
80+
foreach:
81+
input: '[{}]'
82+
iterator: partsItem
83+
mappings:
84+
- text:
85+
template: '{{$Trigger.messageBody}} '
86+
- modelId:
87+
template: models/embedding-001
88+
$map: http://ibm.com/appconnect/map/v1
89+
input:
90+
- variable: Trigger
91+
$ref: '#/trigger/payload'
92+
- variable: flowDetails
93+
$ref: '#/flowDetails'
94+
filter: {}
95+
- custom-action:
96+
name: Milvus Search vector
97+
target:
98+
$ref: '#/integration/action-interfaces/action-interface-3'
99+
action: searchVector
100+
map:
101+
mappings:
102+
- annsField:
103+
template: vector
104+
- collectionName:
105+
template: sf
106+
- data:
107+
expression: '[[$GoogleGeminiGenerateembeddings.embedding.values ]]'
108+
- dbName:
109+
template: default
110+
- outputFields:
111+
expression: '["data"]'
112+
$map: http://ibm.com/appconnect/map/v1
113+
input:
114+
- variable: Trigger
115+
$ref: '#/trigger/payload'
116+
- variable: GoogleGeminiGenerateembeddings
117+
$ref: >-
118+
#/node-output/Google Gemini Generate
119+
embeddings/response/payload
120+
- variable: flowDetails
121+
$ref: '#/flowDetails'
122+
filter:
123+
where:
124+
and:
125+
- collectionName: sf
126+
- dbName: default
127+
input:
128+
- variable: Trigger
129+
$ref: '#/trigger/payload'
130+
- variable: GoogleGeminiGenerateembeddings
131+
$ref: >-
132+
#/node-output/Google Gemini Generate
133+
embeddings/response/payload
134+
- variable: flowDetails
135+
$ref: '#/flowDetails'
136+
- custom-action:
137+
name: Google Gemini Generate text with Gemini model
138+
target:
139+
$ref: '#/integration/action-interfaces/action-interface-4'
140+
action: postGenerateTextByModelId
141+
map:
142+
mappings:
143+
- modelId:
144+
template: models/gemini-1.5-pro
145+
- text:
146+
template: >-
147+
Based on the given context
148+
{{$join($MilvusSearchvector.data.data, "\n")}}. Please
149+
answer this question: {{$Trigger.messageBody}}
150+
$map: http://ibm.com/appconnect/map/v1
151+
input:
152+
- variable: Trigger
153+
$ref: '#/trigger/payload'
154+
- variable: GoogleGeminiGenerateembeddings
155+
$ref: >-
156+
#/node-output/Google Gemini Generate
157+
embeddings/response/payload
158+
- variable: MilvusSearchvector
159+
$ref: '#/node-output/Milvus Search vector/response/payload'
160+
- variable: flowDetails
161+
$ref: '#/flowDetails'
162+
filter: {}
163+
- create-action:
164+
name: Slack Send message
165+
target:
166+
$ref: '#/integration/action-interfaces/action-interface-1'
167+
map:
168+
mappings:
169+
- OBJECT_ID:
170+
template: C099ZTD3Q76
171+
- OBJECT_NAME:
172+
template: channel
173+
- text:
174+
template: ' {{$Trigger.messageBody}} : \n {{$GoogleGeminiGeneratetextwithGeminimodel.candidates.content.parts.text}}'
175+
$map: http://ibm.com/appconnect/map/v1
176+
input:
177+
- variable: Trigger
178+
$ref: '#/trigger/payload'
179+
- variable: GoogleGeminiGenerateembeddings
180+
$ref: >-
181+
#/node-output/Google Gemini Generate
182+
embeddings/response/payload
183+
- variable: MilvusSearchvector
184+
$ref: '#/node-output/Milvus Search vector/response/payload'
185+
- variable: GoogleGeminiGeneratetextwithGeminimodel
186+
$ref: >-
187+
#/node-output/Google Gemini Generate text with Gemini
188+
model/response/payload
189+
- variable: flowDetails
190+
$ref: '#/flowDetails'
191+
name: RAG-powered Slack knowledge assistant using Google Gemini and Milvus
192+
models: {}

0 commit comments

Comments
 (0)