@salesforce/lds-adapters-sfap-einstein-ai-gateway 1.250.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/dist/es/es2018/sfap-einstein-ai-gateway.js +1023 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/getGenerations.d.ts +39 -0
- package/dist/es/es2018/types/src/generated/adapters/registerFeedback.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -0
- package/dist/es/es2018/types/src/generated/resources/postAiGptV1Feedback.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/resources/postAiGptV1Generations.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ChatMessage.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/ConversationalMemorySettings.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/Error.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/FeedbackErrorRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/FeedbackRequest.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/FeedbackResponse202Representation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/FeedbackResponseRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/GenerationDetails.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/GenerationRequest.d.ts +58 -0
- package/dist/es/es2018/types/src/generated/types/GenerationResponse.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/GenerationResponseGenerations.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/GenerationSettings.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/GenerationsErrorRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/HyperLink.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/LLMProviderDetails.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/LLMProviderResponse.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/Links.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/ModelResponse.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/PluginGenerationRequest.d.ts +25 -0
- package/dist/es/es2018/types/src/generated/types/PluginGenerationResponse.d.ts +25 -0
- package/dist/es/es2018/types/src/generated/types/SafetyCategoryScores.d.ts +39 -0
- package/dist/es/es2018/types/src/generated/types/SafetyScoreRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +66 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +1062 -0
- package/src/raml/api.raml +717 -0
- package/src/raml/luvio.raml +27 -0
|
@@ -0,0 +1,717 @@
|
|
|
1
|
+
#%RAML 1.0
|
|
2
|
+
types:
|
|
3
|
+
LLMProvidersResponse:
|
|
4
|
+
description: List of LLM providers supported in the gateway.
|
|
5
|
+
type: array
|
|
6
|
+
items: LLMProviderResponse
|
|
7
|
+
GenerationResponse:
|
|
8
|
+
type: object
|
|
9
|
+
properties:
|
|
10
|
+
id:
|
|
11
|
+
description: ID of the generation request.
|
|
12
|
+
type: string
|
|
13
|
+
required: true
|
|
14
|
+
generations:
|
|
15
|
+
description: List of generated text items.
|
|
16
|
+
type: array
|
|
17
|
+
items: GenerationResponseGenerations
|
|
18
|
+
required: true
|
|
19
|
+
prompt?:
|
|
20
|
+
description: Prompt used for the generation. Can be `null`.
|
|
21
|
+
(nullable): true
|
|
22
|
+
type: string | nil
|
|
23
|
+
parameters?:
|
|
24
|
+
description: Any provider-specific attributes included as part of this object. Can be `null`.
|
|
25
|
+
(nullable): true
|
|
26
|
+
type: object
|
|
27
|
+
example:
|
|
28
|
+
strict: false
|
|
29
|
+
value:
|
|
30
|
+
model: text-davinci-003
|
|
31
|
+
object: text_completion
|
|
32
|
+
usage:
|
|
33
|
+
completion_tokens: 235
|
|
34
|
+
prompt_tokens: 91
|
|
35
|
+
total_tokens: 326
|
|
36
|
+
additionalProperties: true
|
|
37
|
+
HyperLink:
|
|
38
|
+
description: Hyperlink object included in the Links schema.
|
|
39
|
+
type: object
|
|
40
|
+
properties:
|
|
41
|
+
href?:
|
|
42
|
+
description: Link to the endpoint.
|
|
43
|
+
example:
|
|
44
|
+
strict: false
|
|
45
|
+
value: https://bot-svc-llm.sfproxy.einstein.aws-prod1-useast1.aws.sfdc.cl/v1.0/chat/session/
|
|
46
|
+
type: string
|
|
47
|
+
Error:
|
|
48
|
+
type: object
|
|
49
|
+
examples:
|
|
50
|
+
generated_1:
|
|
51
|
+
strict: false
|
|
52
|
+
value:
|
|
53
|
+
message: Bad Request
|
|
54
|
+
generated_2:
|
|
55
|
+
strict: false
|
|
56
|
+
value:
|
|
57
|
+
message: Access bearer token is missing or invalid
|
|
58
|
+
generated_3:
|
|
59
|
+
strict: false
|
|
60
|
+
value:
|
|
61
|
+
message: User forbidden from accessing the resource
|
|
62
|
+
generated_4:
|
|
63
|
+
strict: false
|
|
64
|
+
value:
|
|
65
|
+
message: Server is busy and cannot process the request at this time
|
|
66
|
+
generated_5:
|
|
67
|
+
strict: false
|
|
68
|
+
value:
|
|
69
|
+
message: Too many requests for the server to handle
|
|
70
|
+
generated_6:
|
|
71
|
+
strict: false
|
|
72
|
+
value:
|
|
73
|
+
message: Internal server error
|
|
74
|
+
generated_7:
|
|
75
|
+
strict: false
|
|
76
|
+
value:
|
|
77
|
+
message: Service is unavailable
|
|
78
|
+
generated_8:
|
|
79
|
+
strict: false
|
|
80
|
+
value:
|
|
81
|
+
message: List models not supported for this provider
|
|
82
|
+
additionalProperties: true
|
|
83
|
+
properties:
|
|
84
|
+
message:
|
|
85
|
+
description: Exception error message.
|
|
86
|
+
example:
|
|
87
|
+
strict: false
|
|
88
|
+
value: Something went wrong
|
|
89
|
+
type: string
|
|
90
|
+
required: true
|
|
91
|
+
GenerationSettings:
|
|
92
|
+
description: Settings that can be configured for a generation.
|
|
93
|
+
type: object
|
|
94
|
+
properties:
|
|
95
|
+
num_generations?:
|
|
96
|
+
description: Number of completions to be generated for a prompt.
|
|
97
|
+
default: 1
|
|
98
|
+
type: integer
|
|
99
|
+
max_tokens?:
|
|
100
|
+
description: Maximum number of tokens to be generated.
|
|
101
|
+
default: 16
|
|
102
|
+
type: integer
|
|
103
|
+
temperature?:
|
|
104
|
+
description: Sampling temperature to be used. Higher values mean more random token choices. Lower values mean less random token choices. Min value of 0; max value of 1.0.
|
|
105
|
+
default: 0.5
|
|
106
|
+
type: number
|
|
107
|
+
stop_sequences?:
|
|
108
|
+
description: An array of stop sequences to be used. The generated text is cut at the end of the earliest occurrence of a stop sequence.
|
|
109
|
+
type: array
|
|
110
|
+
items:
|
|
111
|
+
type: string
|
|
112
|
+
frequency_penalty?:
|
|
113
|
+
description: The frequency penalty to be used. Min value is 0.0; max value is 1.0. Can reduce the repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
|
|
114
|
+
default: 0.0
|
|
115
|
+
type: number
|
|
116
|
+
presence_penalty?:
|
|
117
|
+
description: The presence penalty to be used. Min value is 0.0; max value is 1.0. Can reduce the repetitiveness of generated tokens. Behaves similarly to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
|
|
118
|
+
default: 0.0
|
|
119
|
+
type: number
|
|
120
|
+
parameters?:
|
|
121
|
+
description: Dictionary of any other parameters that are required by the specified provider. Values are passed as is to the provider so that the request can include parameters that are unique to a provider.
|
|
122
|
+
type: object
|
|
123
|
+
example:
|
|
124
|
+
strict: false
|
|
125
|
+
value:
|
|
126
|
+
top_p: 0.5
|
|
127
|
+
logProbs: 3
|
|
128
|
+
echo: false
|
|
129
|
+
additionalProperties: true
|
|
130
|
+
ChatSupportedProviders:
|
|
131
|
+
description: Provider used in the session.
|
|
132
|
+
enum:
|
|
133
|
+
- OpenAI
|
|
134
|
+
type: any
|
|
135
|
+
Links:
|
|
136
|
+
description: List of Einstein GPT API endpoints for HATEOAS compliance.
|
|
137
|
+
type: object
|
|
138
|
+
additionalProperties: false
|
|
139
|
+
properties:
|
|
140
|
+
self: HyperLink
|
|
141
|
+
session?: HyperLink
|
|
142
|
+
messages?: HyperLink
|
|
143
|
+
LLMProviderDetails:
|
|
144
|
+
description: Dictionary of properties for the provider.
|
|
145
|
+
type: object
|
|
146
|
+
properties:
|
|
147
|
+
provider_type:
|
|
148
|
+
description: Type of LLM provider (internal or external).
|
|
149
|
+
enum:
|
|
150
|
+
- internal
|
|
151
|
+
- external
|
|
152
|
+
type: string
|
|
153
|
+
required: true
|
|
154
|
+
provider_description:
|
|
155
|
+
description: Short description of the provider.
|
|
156
|
+
type: string
|
|
157
|
+
required: true
|
|
158
|
+
supports_generate:
|
|
159
|
+
description: Indicates whether the provider supports the `generate` operation.
|
|
160
|
+
type: boolean
|
|
161
|
+
required: true
|
|
162
|
+
supports_models:
|
|
163
|
+
description: Indicates whether the provider supports the `models` operation.
|
|
164
|
+
type: boolean
|
|
165
|
+
required: true
|
|
166
|
+
supports_embeddings:
|
|
167
|
+
description: Indicates whether the provider supports the `embeddings` operation.
|
|
168
|
+
type: boolean
|
|
169
|
+
required: true
|
|
170
|
+
max_tokens:
|
|
171
|
+
description: The maximum number of tokens allowed by the provider.
|
|
172
|
+
type: integer
|
|
173
|
+
required: true
|
|
174
|
+
ModelsResponse:
|
|
175
|
+
description: List of models for the specified provider.
|
|
176
|
+
type: array
|
|
177
|
+
items: ModelResponse
|
|
178
|
+
UserMessage:
|
|
179
|
+
description: The message from the user to the LLM.
|
|
180
|
+
example:
|
|
181
|
+
strict: false
|
|
182
|
+
value: Write a product description for a new phone.
|
|
183
|
+
type: string
|
|
184
|
+
PluginGenerationRequest:
|
|
185
|
+
description: Generic plug-in generation request
|
|
186
|
+
type: object
|
|
187
|
+
additionalProperties: true
|
|
188
|
+
LLMProviderResponse:
|
|
189
|
+
description: LLM provider properties.
|
|
190
|
+
type: object
|
|
191
|
+
properties:
|
|
192
|
+
name:
|
|
193
|
+
description: Name of the provider.
|
|
194
|
+
enum:
|
|
195
|
+
- OpenAI
|
|
196
|
+
- Cohere
|
|
197
|
+
- InternalTextGeneration
|
|
198
|
+
- InternalCodeGeneration
|
|
199
|
+
type: string
|
|
200
|
+
required: true
|
|
201
|
+
details?: LLMProviderDetails
|
|
202
|
+
GenerationDetails:
|
|
203
|
+
description: Details for a generation request.
|
|
204
|
+
type: object
|
|
205
|
+
properties:
|
|
206
|
+
generations:
|
|
207
|
+
description: Generated responses from the LLM.
|
|
208
|
+
type: array
|
|
209
|
+
items: ChatMessage
|
|
210
|
+
required: true
|
|
211
|
+
parameters?:
|
|
212
|
+
description: Any provider-specific attributes included as part of this object.
|
|
213
|
+
type: object
|
|
214
|
+
example:
|
|
215
|
+
strict: false
|
|
216
|
+
value:
|
|
217
|
+
model: text-davinci-003
|
|
218
|
+
object: text_completion
|
|
219
|
+
usage:
|
|
220
|
+
completion_tokens: 235
|
|
221
|
+
prompt_tokens: 91
|
|
222
|
+
total_tokens: 326
|
|
223
|
+
additionalProperties: true
|
|
224
|
+
ResponseId:
|
|
225
|
+
description: Identifier for a response.
|
|
226
|
+
example:
|
|
227
|
+
strict: false
|
|
228
|
+
value: 014DFFD2-04B5-4765-8EA7-507585268CD3
|
|
229
|
+
type: string
|
|
230
|
+
ChatMessage:
|
|
231
|
+
description: Representation of a message in a conversation.
|
|
232
|
+
type: object
|
|
233
|
+
properties:
|
|
234
|
+
id?:
|
|
235
|
+
description: Generation ID. This value is required to register feedback.
|
|
236
|
+
type: string
|
|
237
|
+
role:
|
|
238
|
+
description: Persona that sent the message.
|
|
239
|
+
enum:
|
|
240
|
+
- system
|
|
241
|
+
- user
|
|
242
|
+
- assistant
|
|
243
|
+
type: string
|
|
244
|
+
required: true
|
|
245
|
+
content:
|
|
246
|
+
description: The content of the message.
|
|
247
|
+
example:
|
|
248
|
+
strict: false
|
|
249
|
+
value: Can you give me a recipe for chocolate brownies?
|
|
250
|
+
type: string
|
|
251
|
+
required: true
|
|
252
|
+
timestamp?:
|
|
253
|
+
description: Timestamp when the message was sent.
|
|
254
|
+
example:
|
|
255
|
+
strict: false
|
|
256
|
+
value: 1682536893
|
|
257
|
+
type: number
|
|
258
|
+
parameters?:
|
|
259
|
+
description: Any provider-specific attributes included as part of this object.
|
|
260
|
+
(nullable): true
|
|
261
|
+
type: object
|
|
262
|
+
example:
|
|
263
|
+
strict: false
|
|
264
|
+
value:
|
|
265
|
+
finish_reason: stop
|
|
266
|
+
index: 0
|
|
267
|
+
logprobs: null
|
|
268
|
+
additionalProperties: true
|
|
269
|
+
generation_safety_score?: SafetyScoreRepresentation
|
|
270
|
+
GenerationResponseGenerations:
|
|
271
|
+
description: Generated text that is part of the generated response.
|
|
272
|
+
type: object
|
|
273
|
+
properties:
|
|
274
|
+
id?:
|
|
275
|
+
description: Generation ID. This value is required to register feedback.
|
|
276
|
+
type: string
|
|
277
|
+
text:
|
|
278
|
+
description: The generated text.
|
|
279
|
+
type: string
|
|
280
|
+
required: true
|
|
281
|
+
parameters?:
|
|
282
|
+
description: Any provider-specific attributes included as part of this object. Can be `null`.
|
|
283
|
+
(nullable): true
|
|
284
|
+
type: object
|
|
285
|
+
example:
|
|
286
|
+
strict: false
|
|
287
|
+
value:
|
|
288
|
+
finish_reason: stop
|
|
289
|
+
index: 0
|
|
290
|
+
logprobs: null
|
|
291
|
+
additionalProperties: true
|
|
292
|
+
generation_safety_score?: SafetyScoreRepresentation
|
|
293
|
+
SafetyCategoryScores:
|
|
294
|
+
description: Probability for each category. A higher probability indicates a more toxic content.
|
|
295
|
+
type: object
|
|
296
|
+
properties:
|
|
297
|
+
toxicity?:
|
|
298
|
+
default: 0.0
|
|
299
|
+
type: number
|
|
300
|
+
minimum: 0
|
|
301
|
+
maximum: 1
|
|
302
|
+
hate?:
|
|
303
|
+
default: 0.0
|
|
304
|
+
type: number
|
|
305
|
+
minimum: 0
|
|
306
|
+
maximum: 1
|
|
307
|
+
identity?:
|
|
308
|
+
default: 0.0
|
|
309
|
+
type: number
|
|
310
|
+
minimum: 0
|
|
311
|
+
maximum: 1
|
|
312
|
+
violence?:
|
|
313
|
+
default: 0.0
|
|
314
|
+
type: number
|
|
315
|
+
minimum: 0
|
|
316
|
+
maximum: 1
|
|
317
|
+
physical?:
|
|
318
|
+
default: 0.0
|
|
319
|
+
type: number
|
|
320
|
+
minimum: 0
|
|
321
|
+
maximum: 1
|
|
322
|
+
sexual?:
|
|
323
|
+
default: 0.0
|
|
324
|
+
type: number
|
|
325
|
+
minimum: 0
|
|
326
|
+
maximum: 1
|
|
327
|
+
profanity?:
|
|
328
|
+
default: 0.0
|
|
329
|
+
type: number
|
|
330
|
+
minimum: 0
|
|
331
|
+
maximum: 1
|
|
332
|
+
PluginGenerationResponse:
|
|
333
|
+
description: Generic plug-in generation response
|
|
334
|
+
type: object
|
|
335
|
+
additionalProperties: true
|
|
336
|
+
GenerationRequest:
|
|
337
|
+
type: object
|
|
338
|
+
properties:
|
|
339
|
+
prompt:
|
|
340
|
+
description: The prompt or text to be completed.
|
|
341
|
+
type: string
|
|
342
|
+
required: true
|
|
343
|
+
num_generations?:
|
|
344
|
+
description: Number of completions to be generated for the prompt.
|
|
345
|
+
default: 1
|
|
346
|
+
type: integer
|
|
347
|
+
max_tokens?:
|
|
348
|
+
description: Maximum number of tokens to be generated.
|
|
349
|
+
type: integer
|
|
350
|
+
enable_pii_masking?:
|
|
351
|
+
description: Indicates whether to mask personally identifiable information (PII) in the prompt. Defaults to `false`.
|
|
352
|
+
type: boolean
|
|
353
|
+
temperature?:
|
|
354
|
+
description: Sampling temperature to be used. Higher values mean more random token choices. Lower values mean less random token choices. Min value of 0; max value of 1.0.
|
|
355
|
+
default: 0.5
|
|
356
|
+
type: number
|
|
357
|
+
stop_sequences?:
|
|
358
|
+
description: An array of stop sequences. The generated text is cut at the end of the earliest occurrence of a stop sequence.
|
|
359
|
+
type: array
|
|
360
|
+
items:
|
|
361
|
+
type: string
|
|
362
|
+
frequency_penalty?:
|
|
363
|
+
description: The frequency penalty. Min value is 0.0; max value is 1.0. Can reduce the repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
|
|
364
|
+
default: 0.0
|
|
365
|
+
type: number
|
|
366
|
+
presence_penalty?:
|
|
367
|
+
description: The presence penalty. Min value is 0.0; max value is 1.0. Can reduce the repetitiveness of generated tokens. Behaves similarly to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
|
|
368
|
+
default: 0.0
|
|
369
|
+
type: number
|
|
370
|
+
model?:
|
|
371
|
+
description: The model to be used for generating responses. Defaults to a provider-specific model.
|
|
372
|
+
example:
|
|
373
|
+
strict: false
|
|
374
|
+
value: text-davinci-003
|
|
375
|
+
type: string
|
|
376
|
+
parameters?:
|
|
377
|
+
description: Dictionary of any other parameters that are required by the provider. Values are passed as is to the provider so that the request can include parameters that are unique to a provider.
|
|
378
|
+
type: object
|
|
379
|
+
example:
|
|
380
|
+
strict: false
|
|
381
|
+
value:
|
|
382
|
+
top_p: 0.5
|
|
383
|
+
logProbs: 3
|
|
384
|
+
echo: false
|
|
385
|
+
additionalProperties: true
|
|
386
|
+
tags?:
|
|
387
|
+
description: Dictionary of any other information relevant to the gateway client.
|
|
388
|
+
type: object
|
|
389
|
+
example:
|
|
390
|
+
strict: false
|
|
391
|
+
value:
|
|
392
|
+
node-id: node-53p98pwse5i39ququ4
|
|
393
|
+
node-53p98pwse5i39ququ4: gateway-request-id
|
|
394
|
+
additionalProperties: true
|
|
395
|
+
SafetyScoreRepresentation:
|
|
396
|
+
description: Overall score and category score
|
|
397
|
+
type: object
|
|
398
|
+
properties:
|
|
399
|
+
safety_score?:
|
|
400
|
+
description: A higher score implies safer content
|
|
401
|
+
type: number
|
|
402
|
+
minimum: 0
|
|
403
|
+
maximum: 1
|
|
404
|
+
category_scores?: SafetyCategoryScores
|
|
405
|
+
ModelResponse:
|
|
406
|
+
description: Model properties.
|
|
407
|
+
type: object
|
|
408
|
+
properties:
|
|
409
|
+
id:
|
|
410
|
+
description: ID of the model.
|
|
411
|
+
type: string
|
|
412
|
+
required: true
|
|
413
|
+
properties?:
|
|
414
|
+
description: Dictionary of properties for the model. Values are specific to each provider.
|
|
415
|
+
type: object
|
|
416
|
+
example:
|
|
417
|
+
strict: false
|
|
418
|
+
value:
|
|
419
|
+
permission:
|
|
420
|
+
- allow_fine_tuning: true
|
|
421
|
+
GenerationsErrorRepresentation:
|
|
422
|
+
description: Error response representation
|
|
423
|
+
type: object
|
|
424
|
+
additionalProperties: true
|
|
425
|
+
properties:
|
|
426
|
+
message:
|
|
427
|
+
description: Exception error message
|
|
428
|
+
type: string
|
|
429
|
+
required: true
|
|
430
|
+
ConversationalMemorySettings:
|
|
431
|
+
description: Settings that can be configured for conversational memory
|
|
432
|
+
type: object
|
|
433
|
+
properties:
|
|
434
|
+
strategy?:
|
|
435
|
+
description: The strategy to use when providing conversational context to the LLM.
|
|
436
|
+
default: last_n_turns
|
|
437
|
+
enum:
|
|
438
|
+
- last_n_turns
|
|
439
|
+
type: string
|
|
440
|
+
max_turns?:
|
|
441
|
+
description: Maximum number of turns to be included in the context provided to the LLM. To be used with last_n_turns strategy.
|
|
442
|
+
default: 5
|
|
443
|
+
type: integer
|
|
444
|
+
GenerationSettingsResponse:
|
|
445
|
+
(amf-and):
|
|
446
|
+
- GenerationSettings
|
|
447
|
+
type: any
|
|
448
|
+
FeedbackRequest:
|
|
449
|
+
type: object
|
|
450
|
+
properties:
|
|
451
|
+
id:
|
|
452
|
+
description: A unique ID for the feedback object.
|
|
453
|
+
type: string
|
|
454
|
+
generation_id:
|
|
455
|
+
description: The ID of the gateway's generation response. For example, `GenerationResponseGenerations.id`.
|
|
456
|
+
type: string
|
|
457
|
+
feedback?:
|
|
458
|
+
description: The feedback sentiment. Can be `null`.
|
|
459
|
+
enum:
|
|
460
|
+
- GOOD
|
|
461
|
+
- BAD
|
|
462
|
+
(nullable): true
|
|
463
|
+
type: string
|
|
464
|
+
feedback_text?:
|
|
465
|
+
description: The textual representation of the feedback as provided by the user.
|
|
466
|
+
type: string
|
|
467
|
+
source?:
|
|
468
|
+
description: The source of the feedback. For example, `human` or `app`.
|
|
469
|
+
type: string
|
|
470
|
+
app_feedback?:
|
|
471
|
+
description: Dictionary of any app-level feedback and any other free-form parameters.
|
|
472
|
+
type: object
|
|
473
|
+
additionalProperties: true
|
|
474
|
+
FeedbackResponseRepresentation:
|
|
475
|
+
description: Output of a einstein llm feedback call
|
|
476
|
+
type: object
|
|
477
|
+
properties:
|
|
478
|
+
message:
|
|
479
|
+
description: Response text of the feedback API
|
|
480
|
+
type: string
|
|
481
|
+
FeedbackResponse202Representation:
|
|
482
|
+
description: Output of a einstein llm feedback call
|
|
483
|
+
type: object
|
|
484
|
+
additionalProperties: true
|
|
485
|
+
properties:
|
|
486
|
+
message:
|
|
487
|
+
description: Response text of the feedback API
|
|
488
|
+
type: string
|
|
489
|
+
FeedbackErrorRepresentation:
|
|
490
|
+
description: Feedback Error Representation
|
|
491
|
+
type: object
|
|
492
|
+
additionalProperties: true
|
|
493
|
+
properties:
|
|
494
|
+
message:
|
|
495
|
+
description: Exception error message
|
|
496
|
+
type: string
|
|
497
|
+
annotationTypes:
|
|
498
|
+
amf-serverDescription:
|
|
499
|
+
type: any
|
|
500
|
+
amf-exclusiveMinimum:
|
|
501
|
+
type: any
|
|
502
|
+
amf-binding:
|
|
503
|
+
type: any
|
|
504
|
+
nullable:
|
|
505
|
+
type: any
|
|
506
|
+
amf-pattern:
|
|
507
|
+
type: any
|
|
508
|
+
amf-payloads:
|
|
509
|
+
type: any
|
|
510
|
+
amf-exclusiveMaximum:
|
|
511
|
+
type: any
|
|
512
|
+
amf-consumes:
|
|
513
|
+
type: any
|
|
514
|
+
amf-additionalProperties:
|
|
515
|
+
type: any
|
|
516
|
+
amf-or:
|
|
517
|
+
type: any
|
|
518
|
+
amf-url:
|
|
519
|
+
type: any
|
|
520
|
+
amf-externalDocs:
|
|
521
|
+
type: any
|
|
522
|
+
amf-flow:
|
|
523
|
+
type: any
|
|
524
|
+
amf-oasDeprecated:
|
|
525
|
+
type: any
|
|
526
|
+
amf-contact:
|
|
527
|
+
type: any
|
|
528
|
+
amf-multipleOf:
|
|
529
|
+
type: any
|
|
530
|
+
amf-xor:
|
|
531
|
+
type: any
|
|
532
|
+
amf-not:
|
|
533
|
+
type: any
|
|
534
|
+
amf-callbacks:
|
|
535
|
+
type: any
|
|
536
|
+
amf-produces:
|
|
537
|
+
type: any
|
|
538
|
+
amf-format:
|
|
539
|
+
type: any
|
|
540
|
+
amf-license:
|
|
541
|
+
type: any
|
|
542
|
+
amf-summary:
|
|
543
|
+
type: any
|
|
544
|
+
amf-responses:
|
|
545
|
+
type: any
|
|
546
|
+
amf-maximum:
|
|
547
|
+
type: any
|
|
548
|
+
amf-tags:
|
|
549
|
+
type: any
|
|
550
|
+
amf-dependencies:
|
|
551
|
+
type: any
|
|
552
|
+
amf-readOnly:
|
|
553
|
+
type: any
|
|
554
|
+
amf-tuple:
|
|
555
|
+
type: any
|
|
556
|
+
amf-examples:
|
|
557
|
+
type: any
|
|
558
|
+
amf-collectionFormat:
|
|
559
|
+
type: any
|
|
560
|
+
amf-termsOfService:
|
|
561
|
+
type: any
|
|
562
|
+
amf-servers:
|
|
563
|
+
type: any
|
|
564
|
+
amf-xone:
|
|
565
|
+
type: any
|
|
566
|
+
amf-defaultResponse:
|
|
567
|
+
type: any
|
|
568
|
+
amf-baseUriParameters:
|
|
569
|
+
type: any
|
|
570
|
+
amf-parameters:
|
|
571
|
+
type: any
|
|
572
|
+
amf-minimum:
|
|
573
|
+
type: any
|
|
574
|
+
amf-recursive:
|
|
575
|
+
type: any
|
|
576
|
+
amf-and:
|
|
577
|
+
type: any
|
|
578
|
+
securitySchemes:
|
|
579
|
+
bearerAuth:
|
|
580
|
+
type: http
|
|
581
|
+
description: HTTP C2C (cloud-to-cloud) authentication scheme. Must be in the format `C2C <C2C Token>`.
|
|
582
|
+
settings: {}
|
|
583
|
+
title: Generative AI Gateway API
|
|
584
|
+
baseUri: api.salesforce.com
|
|
585
|
+
description: |
|
|
586
|
+
The Generative AI Gateway API connects your Einstein GPT application to large language models (LLMs) from Salesforce-approved providers.
|
|
587
|
+
|
|
588
|
+
To learn more about developing Einstein GPT applications, see the [developer guides](https://gpt-sfdocs.herokuapp.com/docs/platform/foundations/guide/) and the [Confluence space](https://www.sfdc.co/ai).
|
|
589
|
+
version: v1
|
|
590
|
+
/ai/gpt/v1/generations:
|
|
591
|
+
post:
|
|
592
|
+
displayName: generations
|
|
593
|
+
description: Generate a response based on the provided prompt and model parameters.
|
|
594
|
+
(amf-summary): Generate response
|
|
595
|
+
headers:
|
|
596
|
+
'x-client-feature-id':
|
|
597
|
+
type: string
|
|
598
|
+
description: Client Feature Id.
|
|
599
|
+
'x-LLM-Provider':
|
|
600
|
+
description: Provider to use.
|
|
601
|
+
required: true
|
|
602
|
+
enum:
|
|
603
|
+
- OpenAI
|
|
604
|
+
- Cohere
|
|
605
|
+
- InternalTextGeneration
|
|
606
|
+
- InternalCodeGeneration
|
|
607
|
+
example:
|
|
608
|
+
strict: false
|
|
609
|
+
value: OpenAI
|
|
610
|
+
type: string
|
|
611
|
+
body:
|
|
612
|
+
application/json:
|
|
613
|
+
type: GenerationRequest
|
|
614
|
+
responses:
|
|
615
|
+
'200':
|
|
616
|
+
description: OK
|
|
617
|
+
body:
|
|
618
|
+
application/json:
|
|
619
|
+
type: GenerationResponse
|
|
620
|
+
'400':
|
|
621
|
+
description: Bad Request
|
|
622
|
+
body:
|
|
623
|
+
application/json:
|
|
624
|
+
type: GenerationsErrorRepresentation
|
|
625
|
+
'401':
|
|
626
|
+
description: Access bearer token is missing or invalid
|
|
627
|
+
body:
|
|
628
|
+
application/json:
|
|
629
|
+
type: GenerationsErrorRepresentation
|
|
630
|
+
'403':
|
|
631
|
+
description: User forbidden from accessing the resource
|
|
632
|
+
body:
|
|
633
|
+
application/json:
|
|
634
|
+
type: GenerationsErrorRepresentation
|
|
635
|
+
'423':
|
|
636
|
+
description: Server is busy and cannot process the request at this time
|
|
637
|
+
body:
|
|
638
|
+
application/json:
|
|
639
|
+
type: GenerationsErrorRepresentation
|
|
640
|
+
'429':
|
|
641
|
+
description: Too many requests for the server to handle
|
|
642
|
+
body:
|
|
643
|
+
application/json:
|
|
644
|
+
type: GenerationsErrorRepresentation
|
|
645
|
+
'500':
|
|
646
|
+
description: Internal server error.
|
|
647
|
+
body:
|
|
648
|
+
application/json:
|
|
649
|
+
type: GenerationsErrorRepresentation
|
|
650
|
+
'503':
|
|
651
|
+
description: Service is unavailable
|
|
652
|
+
body:
|
|
653
|
+
application/json:
|
|
654
|
+
type: GenerationsErrorRepresentation
|
|
655
|
+
'501':
|
|
656
|
+
description: Something went wrong
|
|
657
|
+
body:
|
|
658
|
+
application/json:
|
|
659
|
+
type: GenerationsErrorRepresentation
|
|
660
|
+
securedBy:
|
|
661
|
+
- bearerAuth
|
|
662
|
+
|
|
663
|
+
/ai/gpt/v1/feedback:
|
|
664
|
+
post:
|
|
665
|
+
displayName: feedback
|
|
666
|
+
description: Register feedback for a generation.
|
|
667
|
+
(amf-summary): Register feedback
|
|
668
|
+
headers:
|
|
669
|
+
'x-client-feature-id':
|
|
670
|
+
type: string
|
|
671
|
+
description: Client Feature Id.
|
|
672
|
+
body:
|
|
673
|
+
application/json: FeedbackRequest
|
|
674
|
+
responses:
|
|
675
|
+
'202':
|
|
676
|
+
description: Accepted
|
|
677
|
+
body:
|
|
678
|
+
application/json:
|
|
679
|
+
type: FeedbackResponse202Representation
|
|
680
|
+
'200':
|
|
681
|
+
description: Something went wrong
|
|
682
|
+
body:
|
|
683
|
+
application/json:
|
|
684
|
+
type: FeedbackResponseRepresentation # Use FeedbackErrorRepresentation as it's an error if luvio key is relaxed
|
|
685
|
+
'400':
|
|
686
|
+
description: Bad Request
|
|
687
|
+
body:
|
|
688
|
+
application/json:
|
|
689
|
+
type: FeedbackErrorRepresentation
|
|
690
|
+
'401':
|
|
691
|
+
description: Access bearer token is missing or invalid
|
|
692
|
+
body:
|
|
693
|
+
application/json:
|
|
694
|
+
type: FeedbackErrorRepresentation
|
|
695
|
+
'403':
|
|
696
|
+
description: User forbidden from accessing the resource
|
|
697
|
+
body:
|
|
698
|
+
application/json:
|
|
699
|
+
type: FeedbackErrorRepresentation
|
|
700
|
+
'423':
|
|
701
|
+
description: Server is busy and cannot process the request at this time
|
|
702
|
+
body:
|
|
703
|
+
application/json:
|
|
704
|
+
type: FeedbackErrorRepresentation
|
|
705
|
+
'429':
|
|
706
|
+
description: Too many requests for the server to handle
|
|
707
|
+
body:
|
|
708
|
+
application/json:
|
|
709
|
+
type: FeedbackErrorRepresentation
|
|
710
|
+
'503':
|
|
711
|
+
description: Service is unavailable
|
|
712
|
+
body:
|
|
713
|
+
application/json:
|
|
714
|
+
type: FeedbackErrorRepresentation
|
|
715
|
+
|
|
716
|
+
securedBy:
|
|
717
|
+
- bearerAuth
|