oci-generativeaiinference 2.86.3 → 2.88.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/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client.d.ts +5 -5
- package/lib/client.js +5 -5
- package/lib/model/assistant-message.d.ts +35 -0
- package/lib/model/assistant-message.js +57 -0
- package/lib/model/assistant-message.js.map +1 -0
- package/lib/model/base-chat-request.d.ts +2 -2
- package/lib/model/base-chat-request.js +1 -1
- package/lib/model/base-chat-response.d.ts +2 -2
- package/lib/model/base-chat-response.js +1 -1
- package/lib/model/chat-choice.d.ts +2 -2
- package/lib/model/chat-choice.js +1 -1
- package/lib/model/chat-content.d.ts +1 -1
- package/lib/model/chat-content.js +1 -1
- package/lib/model/chat-details.d.ts +3 -3
- package/lib/model/chat-details.js +1 -1
- package/lib/model/chat-result.d.ts +2 -2
- package/lib/model/chat-result.js +1 -1
- package/lib/model/choice.d.ts +2 -2
- package/lib/model/choice.js +1 -1
- package/lib/model/citation.d.ts +6 -6
- package/lib/model/citation.js +1 -1
- package/lib/model/cohere-chat-bot-message.d.ts +39 -0
- package/lib/model/cohere-chat-bot-message.js +71 -0
- package/lib/model/cohere-chat-bot-message.js.map +1 -0
- package/lib/model/cohere-chat-request.d.ts +74 -18
- package/lib/model/cohere-chat-request.js +31 -1
- package/lib/model/cohere-chat-request.js.map +1 -1
- package/lib/model/cohere-chat-response.d.ts +39 -10
- package/lib/model/cohere-chat-response.js +21 -1
- package/lib/model/cohere-chat-response.js.map +1 -1
- package/lib/model/cohere-llm-inference-request.d.ts +1 -1
- package/lib/model/cohere-llm-inference-request.js +1 -1
- package/lib/model/cohere-llm-inference-response.d.ts +1 -1
- package/lib/model/cohere-llm-inference-response.js +1 -1
- package/lib/model/cohere-message.d.ts +3 -14
- package/lib/model/cohere-message.js +52 -6
- package/lib/model/cohere-message.js.map +1 -1
- package/lib/model/cohere-parameter-definition.d.ts +40 -0
- package/lib/model/cohere-parameter-definition.js +36 -0
- package/lib/model/cohere-parameter-definition.js.map +1 -0
- package/lib/model/cohere-system-message.d.ts +35 -0
- package/lib/model/cohere-system-message.js +59 -0
- package/lib/model/cohere-system-message.js.map +1 -0
- package/lib/model/cohere-tool-call.d.ts +36 -0
- package/lib/model/cohere-tool-call.js +36 -0
- package/lib/model/cohere-tool-call.js.map +1 -0
- package/lib/model/cohere-tool-message.d.ts +35 -0
- package/lib/model/cohere-tool-message.js +71 -0
- package/lib/model/cohere-tool-message.js.map +1 -0
- package/lib/model/cohere-tool-result.d.ts +34 -0
- package/lib/model/cohere-tool-result.js +60 -0
- package/lib/model/cohere-tool-result.js.map +1 -0
- package/lib/model/cohere-tool.d.ts +43 -0
- package/lib/model/cohere-tool.js +65 -0
- package/lib/model/cohere-tool.js.map +1 -0
- package/lib/model/cohere-user-message.d.ts +35 -0
- package/lib/model/cohere-user-message.js +59 -0
- package/lib/model/cohere-user-message.js.map +1 -0
- package/lib/model/dedicated-serving-mode.d.ts +1 -1
- package/lib/model/dedicated-serving-mode.js +1 -1
- package/lib/model/embed-text-details.d.ts +3 -3
- package/lib/model/embed-text-details.js +1 -1
- package/lib/model/embed-text-result.d.ts +1 -1
- package/lib/model/embed-text-result.js +1 -1
- package/lib/model/generate-text-details.d.ts +2 -2
- package/lib/model/generate-text-details.js +1 -1
- package/lib/model/generate-text-result.d.ts +1 -1
- package/lib/model/generate-text-result.js +1 -1
- package/lib/model/generated-text.d.ts +1 -1
- package/lib/model/generated-text.js +1 -1
- package/lib/model/generic-chat-request.d.ts +12 -7
- package/lib/model/generic-chat-request.js +1 -1
- package/lib/model/generic-chat-request.js.map +1 -1
- package/lib/model/generic-chat-response.d.ts +3 -3
- package/lib/model/generic-chat-response.js +1 -1
- package/lib/model/index.d.ts +23 -1
- package/lib/model/index.js +24 -2
- package/lib/model/index.js.map +1 -1
- package/lib/model/llama-llm-inference-request.d.ts +2 -2
- package/lib/model/llama-llm-inference-request.js +1 -1
- package/lib/model/llama-llm-inference-response.d.ts +1 -1
- package/lib/model/llama-llm-inference-response.js +1 -1
- package/lib/model/llm-inference-request.d.ts +1 -1
- package/lib/model/llm-inference-request.js +1 -1
- package/lib/model/llm-inference-response.d.ts +1 -1
- package/lib/model/llm-inference-response.js +1 -1
- package/lib/model/logprobs.d.ts +6 -3
- package/lib/model/logprobs.js +1 -1
- package/lib/model/logprobs.js.map +1 -1
- package/lib/model/message.d.ts +4 -7
- package/lib/model/message.js +28 -1
- package/lib/model/message.js.map +1 -1
- package/lib/model/on-demand-serving-mode.d.ts +2 -2
- package/lib/model/on-demand-serving-mode.js +1 -1
- package/lib/model/search-query.d.ts +1 -1
- package/lib/model/search-query.js +1 -1
- package/lib/model/serving-mode.d.ts +2 -2
- package/lib/model/serving-mode.js +1 -1
- package/lib/model/summarize-text-details.d.ts +2 -2
- package/lib/model/summarize-text-details.js +1 -1
- package/lib/model/summarize-text-result.d.ts +1 -1
- package/lib/model/summarize-text-result.js +1 -1
- package/lib/model/system-message.d.ts +35 -0
- package/lib/model/system-message.js +57 -0
- package/lib/model/system-message.js.map +1 -0
- package/lib/model/text-content.d.ts +2 -2
- package/lib/model/text-content.js +1 -1
- package/lib/model/token-likelihood.d.ts +1 -1
- package/lib/model/token-likelihood.js +1 -1
- package/lib/model/user-message.d.ts +35 -0
- package/lib/model/user-message.js +57 -0
- package/lib/model/user-message.js.map +1 -0
- package/lib/request/chat-request.d.ts +3 -4
- package/lib/request/embed-text-request.d.ts +3 -4
- package/lib/request/generate-text-request.d.ts +3 -4
- package/lib/request/index.d.ts +1 -1
- package/lib/request/index.js +1 -1
- package/lib/request/summarize-text-request.d.ts +3 -4
- package/lib/response/index.d.ts +1 -1
- package/lib/response/index.js +1 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
package/lib/client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
|
@@ -88,7 +88,7 @@ export declare class GenerativeAiInferenceClient {
|
|
|
88
88
|
* @param ChatRequest
|
|
89
89
|
* @return ChatResponse
|
|
90
90
|
* @throws OciError when an error occurs
|
|
91
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
91
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.88.0/generativeaiinference/Chat.ts.html |here} to see how to use Chat API.
|
|
92
92
|
*/
|
|
93
93
|
chat(chatRequest: requests.ChatRequest): Promise<responses.ChatResponse | ReadableStream<Uint8Array> | null>;
|
|
94
94
|
/**
|
|
@@ -100,7 +100,7 @@ export declare class GenerativeAiInferenceClient {
|
|
|
100
100
|
* @param EmbedTextRequest
|
|
101
101
|
* @return EmbedTextResponse
|
|
102
102
|
* @throws OciError when an error occurs
|
|
103
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
103
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.88.0/generativeaiinference/EmbedText.ts.html |here} to see how to use EmbedText API.
|
|
104
104
|
*/
|
|
105
105
|
embedText(embedTextRequest: requests.EmbedTextRequest): Promise<responses.EmbedTextResponse>;
|
|
106
106
|
/**
|
|
@@ -110,7 +110,7 @@ export declare class GenerativeAiInferenceClient {
|
|
|
110
110
|
* @param GenerateTextRequest
|
|
111
111
|
* @return GenerateTextResponse
|
|
112
112
|
* @throws OciError when an error occurs
|
|
113
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
113
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.88.0/generativeaiinference/GenerateText.ts.html |here} to see how to use GenerateText API.
|
|
114
114
|
*/
|
|
115
115
|
generateText(generateTextRequest: requests.GenerateTextRequest): Promise<responses.GenerateTextResponse | ReadableStream<Uint8Array> | null>;
|
|
116
116
|
/**
|
|
@@ -120,7 +120,7 @@ export declare class GenerativeAiInferenceClient {
|
|
|
120
120
|
* @param SummarizeTextRequest
|
|
121
121
|
* @return SummarizeTextResponse
|
|
122
122
|
* @throws OciError when an error occurs
|
|
123
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
123
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.88.0/generativeaiinference/SummarizeText.ts.html |here} to see how to use SummarizeText API.
|
|
124
124
|
*/
|
|
125
125
|
summarizeText(summarizeTextRequest: requests.SummarizeTextRequest): Promise<responses.SummarizeTextResponse>;
|
|
126
126
|
}
|
package/lib/client.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
|
@@ -188,7 +188,7 @@ class GenerativeAiInferenceClient {
|
|
|
188
188
|
* @param ChatRequest
|
|
189
189
|
* @return ChatResponse
|
|
190
190
|
* @throws OciError when an error occurs
|
|
191
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
191
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.88.0/generativeaiinference/Chat.ts.html |here} to see how to use Chat API.
|
|
192
192
|
*/
|
|
193
193
|
chat(chatRequest) {
|
|
194
194
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -259,7 +259,7 @@ class GenerativeAiInferenceClient {
|
|
|
259
259
|
* @param EmbedTextRequest
|
|
260
260
|
* @return EmbedTextResponse
|
|
261
261
|
* @throws OciError when an error occurs
|
|
262
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
262
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.88.0/generativeaiinference/EmbedText.ts.html |here} to see how to use EmbedText API.
|
|
263
263
|
*/
|
|
264
264
|
embedText(embedTextRequest) {
|
|
265
265
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -323,7 +323,7 @@ class GenerativeAiInferenceClient {
|
|
|
323
323
|
* @param GenerateTextRequest
|
|
324
324
|
* @return GenerateTextResponse
|
|
325
325
|
* @throws OciError when an error occurs
|
|
326
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
326
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.88.0/generativeaiinference/GenerateText.ts.html |here} to see how to use GenerateText API.
|
|
327
327
|
*/
|
|
328
328
|
generateText(generateTextRequest) {
|
|
329
329
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -392,7 +392,7 @@ class GenerativeAiInferenceClient {
|
|
|
392
392
|
* @param SummarizeTextRequest
|
|
393
393
|
* @return SummarizeTextResponse
|
|
394
394
|
* @throws OciError when an error occurs
|
|
395
|
-
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.
|
|
395
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.88.0/generativeaiinference/SummarizeText.ts.html |here} to see how to use SummarizeText API.
|
|
396
396
|
*/
|
|
397
397
|
summarizeText(summarizeTextRequest) {
|
|
398
398
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generative AI Service Inference API
|
|
3
|
+
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
|
+
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
|
|
7
|
+
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
|
+
|
|
9
|
+
To learn more about the service, see the [Generative AI documentation](/iaas/Content/generative-ai/home.htm).
|
|
10
|
+
|
|
11
|
+
* OpenAPI spec version: 20231130
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
15
|
+
* Do not edit the class manually.
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
|
18
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
19
|
+
*/
|
|
20
|
+
import * as model from "../model";
|
|
21
|
+
/**
|
|
22
|
+
* Represents a single instance of assistant message.
|
|
23
|
+
*/
|
|
24
|
+
export interface AssistantMessage extends model.Message {
|
|
25
|
+
/**
|
|
26
|
+
* An optional name for the participant. Provides the model information to differentiate between participants of the same role.
|
|
27
|
+
*/
|
|
28
|
+
"name"?: string;
|
|
29
|
+
"role": string;
|
|
30
|
+
}
|
|
31
|
+
export declare namespace AssistantMessage {
|
|
32
|
+
function getJsonObj(obj: AssistantMessage, isParentJsonObj?: boolean): object;
|
|
33
|
+
const role = "ASSISTANT";
|
|
34
|
+
function getDeserializedJsonObj(obj: AssistantMessage, isParentJsonObj?: boolean): object;
|
|
35
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Generative AI Service Inference API
|
|
4
|
+
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
|
+
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
|
+
|
|
8
|
+
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
|
+
|
|
10
|
+
To learn more about the service, see the [Generative AI documentation](/iaas/Content/generative-ai/home.htm).
|
|
11
|
+
|
|
12
|
+
* OpenAPI spec version: 20231130
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
16
|
+
* Do not edit the class manually.
|
|
17
|
+
*
|
|
18
|
+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
|
19
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
20
|
+
*/
|
|
21
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.AssistantMessage = void 0;
|
|
42
|
+
const model = __importStar(require("../model"));
|
|
43
|
+
var AssistantMessage;
|
|
44
|
+
(function (AssistantMessage) {
|
|
45
|
+
function getJsonObj(obj, isParentJsonObj) {
|
|
46
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj ? obj : model.Message.getJsonObj(obj))), {});
|
|
47
|
+
return jsonObj;
|
|
48
|
+
}
|
|
49
|
+
AssistantMessage.getJsonObj = getJsonObj;
|
|
50
|
+
AssistantMessage.role = "ASSISTANT";
|
|
51
|
+
function getDeserializedJsonObj(obj, isParentJsonObj) {
|
|
52
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj ? obj : model.Message.getDeserializedJsonObj(obj))), {});
|
|
53
|
+
return jsonObj;
|
|
54
|
+
}
|
|
55
|
+
AssistantMessage.getDeserializedJsonObj = getDeserializedJsonObj;
|
|
56
|
+
})(AssistantMessage = exports.AssistantMessage || (exports.AssistantMessage = {}));
|
|
57
|
+
//# sourceMappingURL=assistant-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-message.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/assistant-message.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AAelC,IAAiB,gBAAgB,CAkBhC;AAlBD,WAAiB,gBAAgB;IAC/B,SAAgB,UAAU,CAAC,GAAqB,EAAE,eAAyB;QACzE,MAAM,OAAO,mCACR,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAsB,CAAC,GAC7E,EAAE,CACN,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAPe,2BAAU,aAOzB,CAAA;IACY,qBAAI,GAAG,WAAW,CAAC;IAChC,SAAgB,sBAAsB,CAAC,GAAqB,EAAE,eAAyB;QACrF,MAAM,OAAO,mCACR,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAE,KAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAsB,CAAC,GACzF,EAAE,CACN,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAPe,uCAAsB,yBAOrC,CAAA;AACH,CAAC,EAlBgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAkBhC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ To learn more about the service, see the [Generative AI documentation](/iaas/Con
|
|
|
18
18
|
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* The base class to use for the chat inference request.
|
|
22
22
|
*/
|
|
23
23
|
export interface BaseChatRequest {
|
|
24
24
|
"apiFormat": string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ To learn more about the service, see the [Generative AI documentation](/iaas/Con
|
|
|
18
18
|
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* The base class that creates the chat response.
|
|
22
22
|
*/
|
|
23
23
|
export interface BaseChatResponse {
|
|
24
24
|
"apiFormat": string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
|
@@ -26,7 +26,7 @@ export interface ChatChoice {
|
|
|
26
26
|
* The index of the chat. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
27
27
|
*/
|
|
28
28
|
"index": number;
|
|
29
|
-
"message": model.
|
|
29
|
+
"message": model.SystemMessage | model.AssistantMessage | model.UserMessage;
|
|
30
30
|
/**
|
|
31
31
|
* The reason why the model stopped generating tokens.
|
|
32
32
|
* <p>
|
package/lib/model/chat-choice.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
|
@@ -23,11 +23,11 @@ import * as model from "../model";
|
|
|
23
23
|
*/
|
|
24
24
|
export interface ChatDetails {
|
|
25
25
|
/**
|
|
26
|
-
* The OCID of compartment
|
|
26
|
+
* The OCID of compartment in which to call the Generative AI service to chat.
|
|
27
27
|
*/
|
|
28
28
|
"compartmentId": string;
|
|
29
29
|
"servingMode": model.DedicatedServingMode | model.OnDemandServingMode;
|
|
30
|
-
"chatRequest"
|
|
30
|
+
"chatRequest": model.GenericChatRequest | model.CohereChatRequest;
|
|
31
31
|
}
|
|
32
32
|
export declare namespace ChatDetails {
|
|
33
33
|
function getJsonObj(obj: ChatDetails): object;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
|
@@ -23,7 +23,7 @@ import * as model from "../model";
|
|
|
23
23
|
*/
|
|
24
24
|
export interface ChatResult {
|
|
25
25
|
/**
|
|
26
|
-
* The OCID of the model used in this inference request.
|
|
26
|
+
* The OCID of the model that's used in this inference request.
|
|
27
27
|
*/
|
|
28
28
|
"modelId": string;
|
|
29
29
|
/**
|
package/lib/model/chat-result.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
package/lib/model/choice.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ To learn more about the service, see the [Generative AI documentation](/iaas/Con
|
|
|
19
19
|
*/
|
|
20
20
|
import * as model from "../model";
|
|
21
21
|
/**
|
|
22
|
-
* Represents a single instance of generated text.
|
|
22
|
+
* Represents a single instance of the generated text.
|
|
23
23
|
*/
|
|
24
24
|
export interface Choice {
|
|
25
25
|
/**
|
package/lib/model/choice.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
package/lib/model/citation.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generative AI Service Inference API
|
|
3
3
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
4
|
|
|
5
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
6
|
|
|
7
7
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
8
|
|
|
@@ -18,23 +18,23 @@ To learn more about the service, see the [Generative AI documentation](/iaas/Con
|
|
|
18
18
|
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
21
|
-
* A section of the generated
|
|
21
|
+
* A section of the generated response which cites the documents that were used for generating the response.
|
|
22
22
|
*/
|
|
23
23
|
export interface Citation {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Counting from zero, the index of the text where the citation starts. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
26
26
|
*/
|
|
27
27
|
"start": number;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Counting from zero, the index of the text that the citation ends after. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
30
30
|
*/
|
|
31
31
|
"end": number;
|
|
32
32
|
/**
|
|
33
|
-
* The text of the citation
|
|
33
|
+
* The text of the citation.
|
|
34
34
|
*/
|
|
35
35
|
"text": string;
|
|
36
36
|
/**
|
|
37
|
-
* Identifiers
|
|
37
|
+
* Identifiers for the documents cited in the current generated response.
|
|
38
38
|
*/
|
|
39
39
|
"documentIds": Array<string>;
|
|
40
40
|
}
|
package/lib/model/citation.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generative AI Service Inference API
|
|
4
4
|
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
5
5
|
|
|
6
|
-
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
7
7
|
|
|
8
8
|
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
9
9
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generative AI Service Inference API
|
|
3
|
+
* OCI Generative AI is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases for text generation, summarization, and text embeddings.
|
|
4
|
+
|
|
5
|
+
Use the Generative AI service inference API to access your custom model endpoints, or to try the out-of-the-box models to [chat](#/en/generative-ai-inference/latest/ChatResult/Chat), [generate text](#/en/generative-ai-inference/latest/GenerateTextResult/GenerateText), [summarize](#/en/generative-ai-inference/latest/SummarizeTextResult/SummarizeText), and [create text embeddings](#/en/generative-ai-inference/latest/EmbedTextResult/EmbedText).
|
|
6
|
+
|
|
7
|
+
To use a Generative AI custom model for inference, you must first create an endpoint for that model. Use the [Generative AI service management API](/#/en/generative-ai/latest/) to [create a custom model](#/en/generative-ai/latest/Model/) by fine-tuning an out-of-the-box model, or a previous version of a custom model, using your own data. Fine-tune the custom model on a [fine-tuning dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/). Then, create a [hosting dedicated AI cluster](#/en/generative-ai/latest/DedicatedAiCluster/) with an [endpoint](#/en/generative-ai/latest/Endpoint/) to host your custom model. For resource management in the Generative AI service, use the [Generative AI service management API](/#/en/generative-ai/latest/).
|
|
8
|
+
|
|
9
|
+
To learn more about the service, see the [Generative AI documentation](/iaas/Content/generative-ai/home.htm).
|
|
10
|
+
|
|
11
|
+
* OpenAPI spec version: 20231130
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
15
|
+
* Do not edit the class manually.
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
|
18
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
19
|
+
*/
|
|
20
|
+
import * as model from "../model";
|
|
21
|
+
/**
|
|
22
|
+
* A message that represents a single chat dialog as CHATBOT role.
|
|
23
|
+
*/
|
|
24
|
+
export interface CohereChatBotMessage extends model.CohereMessage {
|
|
25
|
+
/**
|
|
26
|
+
* Contents of the chat message.
|
|
27
|
+
*/
|
|
28
|
+
"message"?: string;
|
|
29
|
+
/**
|
|
30
|
+
* A list of tool calls generated by the model.
|
|
31
|
+
*/
|
|
32
|
+
"toolCalls"?: Array<model.CohereToolCall>;
|
|
33
|
+
"role": string;
|
|
34
|
+
}
|
|
35
|
+
export declare namespace CohereChatBotMessage {
|
|
36
|
+
function getJsonObj(obj: CohereChatBotMessage, isParentJsonObj?: boolean): object;
|
|
37
|
+
const role = "CHATBOT";
|
|
38
|
+
function getDeserializedJsonObj(obj: CohereChatBotMessage, isParentJsonObj?: boolean): object;
|
|
39
|
+
}
|