oci-generativeaiinference 2.87.0 → 2.88.1
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
|
@@ -0,0 +1,71 @@
|
|
|
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.CohereChatBotMessage = void 0;
|
|
42
|
+
const model = __importStar(require("../model"));
|
|
43
|
+
var CohereChatBotMessage;
|
|
44
|
+
(function (CohereChatBotMessage) {
|
|
45
|
+
function getJsonObj(obj, isParentJsonObj) {
|
|
46
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj ? obj : model.CohereMessage.getJsonObj(obj))), {
|
|
47
|
+
"toolCalls": obj.toolCalls
|
|
48
|
+
? obj.toolCalls.map(item => {
|
|
49
|
+
return model.CohereToolCall.getJsonObj(item);
|
|
50
|
+
})
|
|
51
|
+
: undefined
|
|
52
|
+
});
|
|
53
|
+
return jsonObj;
|
|
54
|
+
}
|
|
55
|
+
CohereChatBotMessage.getJsonObj = getJsonObj;
|
|
56
|
+
CohereChatBotMessage.role = "CHATBOT";
|
|
57
|
+
function getDeserializedJsonObj(obj, isParentJsonObj) {
|
|
58
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj
|
|
59
|
+
? obj
|
|
60
|
+
: model.CohereMessage.getDeserializedJsonObj(obj))), {
|
|
61
|
+
"toolCalls": obj.toolCalls
|
|
62
|
+
? obj.toolCalls.map(item => {
|
|
63
|
+
return model.CohereToolCall.getDeserializedJsonObj(item);
|
|
64
|
+
})
|
|
65
|
+
: undefined
|
|
66
|
+
});
|
|
67
|
+
return jsonObj;
|
|
68
|
+
}
|
|
69
|
+
CohereChatBotMessage.getDeserializedJsonObj = getDeserializedJsonObj;
|
|
70
|
+
})(CohereChatBotMessage = exports.CohereChatBotMessage || (exports.CohereChatBotMessage = {}));
|
|
71
|
+
//# sourceMappingURL=cohere-chat-bot-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cohere-chat-bot-message.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/cohere-chat-bot-message.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AAmBlC,IAAiB,oBAAoB,CAmCpC;AAnCD,WAAiB,oBAAoB;IACnC,SAAgB,UAAU,CAAC,GAAyB,EAAE,eAAyB;QAC7E,MAAM,OAAO,mCACR,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAA0B,CAAC,GACvF;YACD,WAAW,EAAE,GAAG,CAAC,SAAS;gBACxB,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBACvB,OAAO,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBAC/C,CAAC,CAAC;gBACJ,CAAC,CAAC,SAAS;SACd,CACF,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAbe,+BAAU,aAazB,CAAA;IACY,yBAAI,GAAG,SAAS,CAAC;IAC9B,SAAgB,sBAAsB,CACpC,GAAyB,EACzB,eAAyB;QAEzB,MAAM,OAAO,mCACR,CAAC,eAAe;YACjB,CAAC,CAAC,GAAG;YACL,CAAC,CAAE,KAAK,CAAC,aAAa,CAAC,sBAAsB,CAAC,GAAG,CAA0B,CAAC,GAC3E;YACD,WAAW,EAAE,GAAG,CAAC,SAAS;gBACxB,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBACvB,OAAO,KAAK,CAAC,cAAc,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;gBAC3D,CAAC,CAAC;gBACJ,CAAC,CAAC,SAAS;SACd,CACF,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAlBe,2CAAsB,yBAkBrC,CAAA;AACH,CAAC,EAnCgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAmCpC"}
|
|
@@ -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,47 +23,55 @@ import * as model from "../model";
|
|
|
23
23
|
*/
|
|
24
24
|
export interface CohereChatRequest extends model.BaseChatRequest {
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* The text that the user inputs for the model to respond to.
|
|
27
27
|
*/
|
|
28
28
|
"message": string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* The list of previous messages between the user and the model. The chat history gives the model context for responding to the user's inputs.
|
|
31
31
|
*/
|
|
32
32
|
"chatHistory"?: Array<model.CohereMessage>;
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
* A list of relevant documents that the model can refer to for generating grounded responses to the user's requests.
|
|
35
|
+
* Some example keys that you can add to the dictionary are \"text\", \"author\", and \"date\". Keep the total word count of the strings in the dictionary to 300 words or less.
|
|
36
|
+
* <p>
|
|
37
|
+
Example:
|
|
38
|
+
* {@code [
|
|
39
|
+
* { \"title\": \"Tall penguins\", \"snippet\": \"Emperor penguins are the tallest.\" },
|
|
40
|
+
* { \"title\": \"Penguin habitats\", \"snippet\": \"Emperor penguins only live in Antarctica.\" }
|
|
41
|
+
* ]}
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
40
44
|
"documents"?: Array<any>;
|
|
41
45
|
/**
|
|
42
|
-
* When true, the response
|
|
46
|
+
* When set to true, the response contains only a list of generated search queries without the search results and the model will not respond to the user's message.
|
|
47
|
+
*
|
|
43
48
|
*/
|
|
44
49
|
"isSearchQueriesOnly"?: boolean;
|
|
45
50
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
* If specified, the default Cohere preamble is replaced with the provided preamble. A preamble is an initial guideline message that can change the model's overall chat behavior and conversation style. Default preambles vary for different models.
|
|
52
|
+
* <p>
|
|
53
|
+
Example: {@code You are a travel advisor. Answer with a pirate tone.}
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
48
56
|
"preambleOverride"?: string;
|
|
49
57
|
/**
|
|
50
|
-
* Whether to stream
|
|
58
|
+
* Whether to stream the partial progress of the model's response. When set to true, as tokens become available, they are sent as data-only server-sent events.
|
|
51
59
|
*/
|
|
52
60
|
"isStream"?: boolean;
|
|
53
61
|
/**
|
|
54
|
-
* The maximum number of tokens
|
|
62
|
+
* The maximum number of output tokens that the model will generate for the response. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
55
63
|
*/
|
|
56
64
|
"maxTokens"?: number;
|
|
57
65
|
/**
|
|
58
|
-
* A number that sets the randomness of the generated output. A lower temperature means
|
|
59
|
-
* Use lower numbers for tasks
|
|
66
|
+
* A number that sets the randomness of the generated output. A lower temperature means less random generations.
|
|
67
|
+
* Use lower numbers for tasks such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs.
|
|
60
68
|
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
61
69
|
*/
|
|
62
70
|
"temperature"?: number;
|
|
63
71
|
/**
|
|
64
|
-
*
|
|
72
|
+
* A sampling method in which the model chooses the next token randomly from the top k most likely tokens. A higher value for k generates more random output, which makes the output text sound more natural. The default value for k is 0 which disables this method and considers all tokens. To set a number for the likely tokens, choose an integer between 1 and 500.
|
|
65
73
|
* <p>
|
|
66
|
-
If also using top p, then the model considers only the top tokens whose probabilities add up to p percent and ignores the rest of the k tokens. For example, if k is 20
|
|
74
|
+
If also using top p, then the model considers only the top tokens whose probabilities add up to p percent and ignores the rest of the k tokens. For example, if k is 20 but only the probabilities of the top 10 add up to the value of p, then only the top 10 tokens are chosen.
|
|
67
75
|
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
68
76
|
*/
|
|
69
77
|
"topK"?: number;
|
|
@@ -74,6 +82,11 @@ export interface CohereChatRequest extends model.BaseChatRequest {
|
|
|
74
82
|
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
75
83
|
*/
|
|
76
84
|
"topP"?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Defaults to OFF. Dictates how the prompt will be constructed. With {@code prompt_truncation} set to AUTO_PRESERVE_ORDER, some elements from {@code chat_history} and {@code documents} will be dropped to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved. With {@code prompt_truncation} set to OFF, no elements will be dropped.
|
|
87
|
+
*
|
|
88
|
+
*/
|
|
89
|
+
"promptTruncation"?: CohereChatRequest.PromptTruncation;
|
|
77
90
|
/**
|
|
78
91
|
* To reduce repetitiveness of generated tokens, this number penalizes new tokens based on their frequency in the generated text so far. Greater numbers encourage the model to use new tokens, while lower numbers encourage the model to repeat the tokens. Set to 0 to disable.
|
|
79
92
|
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
@@ -86,9 +99,52 @@ export interface CohereChatRequest extends model.BaseChatRequest {
|
|
|
86
99
|
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
87
100
|
*/
|
|
88
101
|
"presencePenalty"?: number;
|
|
102
|
+
/**
|
|
103
|
+
* If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinism cannot be totally guaranteed.
|
|
104
|
+
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
105
|
+
*/
|
|
106
|
+
"seed"?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Returns the full prompt that was sent to the model when True.
|
|
109
|
+
*/
|
|
110
|
+
"isEcho"?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* A list of available tools (functions) that the model may suggest invoking before producing a text response.
|
|
113
|
+
*/
|
|
114
|
+
"tools"?: Array<model.CohereTool>;
|
|
115
|
+
/**
|
|
116
|
+
* A list of results from invoking tools recommended by the model in the previous chat turn.
|
|
117
|
+
*/
|
|
118
|
+
"toolResults"?: Array<model.CohereToolResult>;
|
|
119
|
+
/**
|
|
120
|
+
* When enabled, the model will issue (potentially multiple) tool calls in a single step, before it receives the tool responses and directly answers the user's original message.
|
|
121
|
+
*
|
|
122
|
+
*/
|
|
123
|
+
"isForceSingleStep"?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Stop the model generation when it reaches a stop sequence defined in this parameter.
|
|
126
|
+
*/
|
|
127
|
+
"stopSequences"?: Array<string>;
|
|
128
|
+
/**
|
|
129
|
+
* When enabled, the user\u2019s {@code message} will be sent to the model without any preprocessing.
|
|
130
|
+
*/
|
|
131
|
+
"isRawPrompting"?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* When FAST is selected, citations are generated at the same time as the text output and the request will be completed sooner. May result in less accurate citations.
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
136
|
+
"citationQuality"?: CohereChatRequest.CitationQuality;
|
|
89
137
|
"apiFormat": string;
|
|
90
138
|
}
|
|
91
139
|
export declare namespace CohereChatRequest {
|
|
140
|
+
enum PromptTruncation {
|
|
141
|
+
Off = "OFF",
|
|
142
|
+
AutoPreserveOrder = "AUTO_PRESERVE_ORDER"
|
|
143
|
+
}
|
|
144
|
+
enum CitationQuality {
|
|
145
|
+
Accurate = "ACCURATE",
|
|
146
|
+
Fast = "FAST"
|
|
147
|
+
}
|
|
92
148
|
function getJsonObj(obj: CohereChatRequest, isParentJsonObj?: boolean): object;
|
|
93
149
|
const apiFormat = "COHERE";
|
|
94
150
|
function getDeserializedJsonObj(obj: CohereChatRequest, isParentJsonObj?: boolean): 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
|
|
|
@@ -42,12 +42,32 @@ exports.CohereChatRequest = void 0;
|
|
|
42
42
|
const model = __importStar(require("../model"));
|
|
43
43
|
var CohereChatRequest;
|
|
44
44
|
(function (CohereChatRequest) {
|
|
45
|
+
let PromptTruncation;
|
|
46
|
+
(function (PromptTruncation) {
|
|
47
|
+
PromptTruncation["Off"] = "OFF";
|
|
48
|
+
PromptTruncation["AutoPreserveOrder"] = "AUTO_PRESERVE_ORDER";
|
|
49
|
+
})(PromptTruncation = CohereChatRequest.PromptTruncation || (CohereChatRequest.PromptTruncation = {}));
|
|
50
|
+
let CitationQuality;
|
|
51
|
+
(function (CitationQuality) {
|
|
52
|
+
CitationQuality["Accurate"] = "ACCURATE";
|
|
53
|
+
CitationQuality["Fast"] = "FAST";
|
|
54
|
+
})(CitationQuality = CohereChatRequest.CitationQuality || (CohereChatRequest.CitationQuality = {}));
|
|
45
55
|
function getJsonObj(obj, isParentJsonObj) {
|
|
46
56
|
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj ? obj : model.BaseChatRequest.getJsonObj(obj))), {
|
|
47
57
|
"chatHistory": obj.chatHistory
|
|
48
58
|
? obj.chatHistory.map(item => {
|
|
49
59
|
return model.CohereMessage.getJsonObj(item);
|
|
50
60
|
})
|
|
61
|
+
: undefined,
|
|
62
|
+
"tools": obj.tools
|
|
63
|
+
? obj.tools.map(item => {
|
|
64
|
+
return model.CohereTool.getJsonObj(item);
|
|
65
|
+
})
|
|
66
|
+
: undefined,
|
|
67
|
+
"toolResults": obj.toolResults
|
|
68
|
+
? obj.toolResults.map(item => {
|
|
69
|
+
return model.CohereToolResult.getJsonObj(item);
|
|
70
|
+
})
|
|
51
71
|
: undefined
|
|
52
72
|
});
|
|
53
73
|
return jsonObj;
|
|
@@ -62,6 +82,16 @@ var CohereChatRequest;
|
|
|
62
82
|
? obj.chatHistory.map(item => {
|
|
63
83
|
return model.CohereMessage.getDeserializedJsonObj(item);
|
|
64
84
|
})
|
|
85
|
+
: undefined,
|
|
86
|
+
"tools": obj.tools
|
|
87
|
+
? obj.tools.map(item => {
|
|
88
|
+
return model.CohereTool.getDeserializedJsonObj(item);
|
|
89
|
+
})
|
|
90
|
+
: undefined,
|
|
91
|
+
"toolResults": obj.toolResults
|
|
92
|
+
? obj.toolResults.map(item => {
|
|
93
|
+
return model.CohereToolResult.getDeserializedJsonObj(item);
|
|
94
|
+
})
|
|
65
95
|
: undefined
|
|
66
96
|
});
|
|
67
97
|
return jsonObj;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cohere-chat-request.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/cohere-chat-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;
|
|
1
|
+
{"version":3,"file":"cohere-chat-request.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/cohere-chat-request.ts"],"names":[],"mappings":"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"}
|
|
@@ -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,31 +23,60 @@ import * as model from "../model";
|
|
|
23
23
|
*/
|
|
24
24
|
export interface CohereChatResponse extends model.BaseChatResponse {
|
|
25
25
|
/**
|
|
26
|
-
* Contents of the
|
|
26
|
+
* Contents of the response that the model generates.
|
|
27
27
|
*/
|
|
28
28
|
"text": string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* The list of previous messages between the user and the model. The chat history gives the model context for responding to the user's inputs.
|
|
31
|
+
*/
|
|
32
|
+
"chatHistory"?: Array<model.CohereMessage>;
|
|
33
|
+
/**
|
|
34
|
+
* Inline citations for the generated response.
|
|
31
35
|
*/
|
|
32
36
|
"citations"?: Array<model.Citation>;
|
|
33
37
|
/**
|
|
34
|
-
*
|
|
38
|
+
* If set to true, a search for documents is required.
|
|
35
39
|
*/
|
|
36
40
|
"isSearchRequired"?: boolean;
|
|
37
41
|
/**
|
|
38
|
-
* Why the generation
|
|
42
|
+
* Why the generation stopped.
|
|
39
43
|
*/
|
|
40
44
|
"finishReason": CohereChatResponse.FinishReason;
|
|
41
45
|
/**
|
|
42
|
-
*
|
|
46
|
+
* If there is an error during the streaming scenario, then the {@code errorMessage} parameter contains details for the error.
|
|
43
47
|
*/
|
|
44
|
-
"
|
|
48
|
+
"errorMessage"?: string;
|
|
45
49
|
/**
|
|
46
|
-
*
|
|
47
|
-
* representing the field and values of the document.
|
|
48
|
-
*
|
|
50
|
+
* The generated search queries.
|
|
49
51
|
*/
|
|
52
|
+
"searchQueries"?: Array<model.SearchQuery>;
|
|
53
|
+
/**
|
|
54
|
+
* The documents that the model can refer to when generating a response. Each document is a JSON string that represents the field and values of the document.
|
|
55
|
+
* <p>
|
|
56
|
+
Example:
|
|
57
|
+
* '[
|
|
58
|
+
* {
|
|
59
|
+
* \"id\": \"doc_0\",
|
|
60
|
+
* \"snippet\": \"Emperor penguins are the tallest.\",
|
|
61
|
+
* \"title\": \"Tall penguins\"
|
|
62
|
+
* },
|
|
63
|
+
* {
|
|
64
|
+
* \"id\": \"doc_1\",
|
|
65
|
+
* \"snippet\": \"Emperor penguins only live in Antarctica.\",
|
|
66
|
+
* \"title\": \"Penguin habitats\"
|
|
67
|
+
* }
|
|
68
|
+
* ]'
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
50
71
|
"documents"?: Array<any>;
|
|
72
|
+
/**
|
|
73
|
+
* A list of tool calls generated by the model.
|
|
74
|
+
*/
|
|
75
|
+
"toolCalls"?: Array<model.CohereToolCall>;
|
|
76
|
+
/**
|
|
77
|
+
* The full prompt that was sent to the model if isEcho is true when request.
|
|
78
|
+
*/
|
|
79
|
+
"prompt"?: string;
|
|
51
80
|
"apiFormat": string;
|
|
52
81
|
}
|
|
53
82
|
export declare namespace CohereChatResponse {
|
|
@@ -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
|
|
|
@@ -58,6 +58,11 @@ var CohereChatResponse;
|
|
|
58
58
|
})(FinishReason = CohereChatResponse.FinishReason || (CohereChatResponse.FinishReason = {}));
|
|
59
59
|
function getJsonObj(obj, isParentJsonObj) {
|
|
60
60
|
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj ? obj : model.BaseChatResponse.getJsonObj(obj))), {
|
|
61
|
+
"chatHistory": obj.chatHistory
|
|
62
|
+
? obj.chatHistory.map(item => {
|
|
63
|
+
return model.CohereMessage.getJsonObj(item);
|
|
64
|
+
})
|
|
65
|
+
: undefined,
|
|
61
66
|
"citations": obj.citations
|
|
62
67
|
? obj.citations.map(item => {
|
|
63
68
|
return model.Citation.getJsonObj(item);
|
|
@@ -67,6 +72,11 @@ var CohereChatResponse;
|
|
|
67
72
|
? obj.searchQueries.map(item => {
|
|
68
73
|
return model.SearchQuery.getJsonObj(item);
|
|
69
74
|
})
|
|
75
|
+
: undefined,
|
|
76
|
+
"toolCalls": obj.toolCalls
|
|
77
|
+
? obj.toolCalls.map(item => {
|
|
78
|
+
return model.CohereToolCall.getJsonObj(item);
|
|
79
|
+
})
|
|
70
80
|
: undefined
|
|
71
81
|
});
|
|
72
82
|
return jsonObj;
|
|
@@ -77,6 +87,11 @@ var CohereChatResponse;
|
|
|
77
87
|
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj
|
|
78
88
|
? obj
|
|
79
89
|
: model.BaseChatResponse.getDeserializedJsonObj(obj))), {
|
|
90
|
+
"chatHistory": obj.chatHistory
|
|
91
|
+
? obj.chatHistory.map(item => {
|
|
92
|
+
return model.CohereMessage.getDeserializedJsonObj(item);
|
|
93
|
+
})
|
|
94
|
+
: undefined,
|
|
80
95
|
"citations": obj.citations
|
|
81
96
|
? obj.citations.map(item => {
|
|
82
97
|
return model.Citation.getDeserializedJsonObj(item);
|
|
@@ -86,6 +101,11 @@ var CohereChatResponse;
|
|
|
86
101
|
? obj.searchQueries.map(item => {
|
|
87
102
|
return model.SearchQuery.getDeserializedJsonObj(item);
|
|
88
103
|
})
|
|
104
|
+
: undefined,
|
|
105
|
+
"toolCalls": obj.toolCalls
|
|
106
|
+
? obj.toolCalls.map(item => {
|
|
107
|
+
return model.CohereToolCall.getDeserializedJsonObj(item);
|
|
108
|
+
})
|
|
89
109
|
: undefined
|
|
90
110
|
});
|
|
91
111
|
return jsonObj;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cohere-chat-response.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/cohere-chat-response.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;
|
|
1
|
+
{"version":3,"file":"cohere-chat-response.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/cohere-chat-response.ts"],"names":[],"mappings":"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"}
|
|
@@ -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
|
|
|
@@ -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,23 +18,12 @@ 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
|
+
* A message that represents a single chat dialog.
|
|
22
22
|
*/
|
|
23
23
|
export interface CohereMessage {
|
|
24
|
-
|
|
25
|
-
* One of CHATBOT|USER to identify who the message is coming from.
|
|
26
|
-
*/
|
|
27
|
-
"role": CohereMessage.Role;
|
|
28
|
-
/**
|
|
29
|
-
* Contents of the chat message.
|
|
30
|
-
*/
|
|
31
|
-
"message": string;
|
|
24
|
+
"role": string;
|
|
32
25
|
}
|
|
33
26
|
export declare namespace CohereMessage {
|
|
34
|
-
enum Role {
|
|
35
|
-
Chatbot = "CHATBOT",
|
|
36
|
-
User = "USER"
|
|
37
|
-
}
|
|
38
27
|
function getJsonObj(obj: CohereMessage): object;
|
|
39
28
|
function getDeserializedJsonObj(obj: CohereMessage): object;
|
|
40
29
|
}
|