oci-generativeaiinference 2.77.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/LICENSE.txt +89 -0
- package/NOTICE.txt +1 -0
- package/README.md +22 -0
- package/THIRD_PARTY_LICENSES.txt +576 -0
- package/index.d.ts +27 -0
- package/index.js +50 -0
- package/index.js.map +1 -0
- package/lib/client.d.ts +113 -0
- package/lib/client.js +376 -0
- package/lib/client.js.map +1 -0
- package/lib/model/choice.d.ts +45 -0
- package/lib/model/choice.js +60 -0
- package/lib/model/choice.js.map +1 -0
- package/lib/model/cohere-llm-inference-request.d.ts +106 -0
- package/lib/model/cohere-llm-inference-request.js +73 -0
- package/lib/model/cohere-llm-inference-request.js.map +1 -0
- package/lib/model/cohere-llm-inference-response.d.ts +43 -0
- package/lib/model/cohere-llm-inference-response.js +73 -0
- package/lib/model/cohere-llm-inference-response.js.map +1 -0
- package/lib/model/dedicated-serving-mode.d.ts +35 -0
- package/lib/model/dedicated-serving-mode.js +59 -0
- package/lib/model/dedicated-serving-mode.js.map +1 -0
- package/lib/model/embed-text-details.d.ts +61 -0
- package/lib/model/embed-text-details.js +75 -0
- package/lib/model/embed-text-details.js.map +1 -0
- package/lib/model/embed-text-result.d.ts +48 -0
- package/lib/model/embed-text-result.js +36 -0
- package/lib/model/embed-text-result.js.map +1 -0
- package/lib/model/generate-text-details.d.ts +35 -0
- package/lib/model/generate-text-details.js +68 -0
- package/lib/model/generate-text-details.js.map +1 -0
- package/lib/model/generate-text-result.d.ts +38 -0
- package/lib/model/generate-text-result.js +64 -0
- package/lib/model/generate-text-result.js.map +1 -0
- package/lib/model/generated-text.d.ts +55 -0
- package/lib/model/generated-text.js +68 -0
- package/lib/model/generated-text.js.map +1 -0
- package/lib/model/index.d.ts +57 -0
- package/lib/model/index.js +80 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/llama-llm-inference-request.d.ts +94 -0
- package/lib/model/llama-llm-inference-request.js +61 -0
- package/lib/model/llama-llm-inference-request.js.map +1 -0
- package/lib/model/llama-llm-inference-response.d.ts +39 -0
- package/lib/model/llama-llm-inference-response.js +73 -0
- package/lib/model/llama-llm-inference-response.js.map +1 -0
- package/lib/model/llm-inference-request.d.ts +29 -0
- package/lib/model/llm-inference-request.js +79 -0
- package/lib/model/llm-inference-request.js.map +1 -0
- package/lib/model/llm-inference-response.d.ts +29 -0
- package/lib/model/llm-inference-response.js +79 -0
- package/lib/model/llm-inference-response.js.map +1 -0
- package/lib/model/logprobs.d.ts +46 -0
- package/lib/model/logprobs.js +36 -0
- package/lib/model/logprobs.js.map +1 -0
- package/lib/model/on-demand-serving-mode.d.ts +35 -0
- package/lib/model/on-demand-serving-mode.js +59 -0
- package/lib/model/on-demand-serving-mode.js.map +1 -0
- package/lib/model/serving-mode.d.ts +29 -0
- package/lib/model/serving-mode.js +79 -0
- package/lib/model/serving-mode.js.map +1 -0
- package/lib/model/summarize-text-details.d.ts +82 -0
- package/lib/model/summarize-text-details.js +82 -0
- package/lib/model/summarize-text-details.js.map +1 -0
- package/lib/model/summarize-text-result.d.ts +48 -0
- package/lib/model/summarize-text-result.js +36 -0
- package/lib/model/summarize-text-result.js.map +1 -0
- package/lib/model/token-likelihood.d.ts +39 -0
- package/lib/model/token-likelihood.js +36 -0
- package/lib/model/token-likelihood.js.map +1 -0
- package/lib/request/embed-text-request.d.ts +36 -0
- package/lib/request/embed-text-request.js +15 -0
- package/lib/request/embed-text-request.js.map +1 -0
- package/lib/request/generate-text-request.d.ts +36 -0
- package/lib/request/generate-text-request.js +15 -0
- package/lib/request/generate-text-request.js.map +1 -0
- package/lib/request/index.d.ts +25 -0
- package/lib/request/index.js +22 -0
- package/lib/request/index.js.map +1 -0
- package/lib/request/summarize-text-request.d.ts +36 -0
- package/lib/request/summarize-text-request.js +15 -0
- package/lib/request/summarize-text-request.js.map +1 -0
- package/lib/response/embed-text-response.d.ts +30 -0
- package/lib/response/embed-text-response.js +15 -0
- package/lib/response/embed-text-response.js.map +1 -0
- package/lib/response/generate-text-response.d.ts +30 -0
- package/lib/response/generate-text-response.js +15 -0
- package/lib/response/generate-text-response.js.map +1 -0
- package/lib/response/index.d.ts +25 -0
- package/lib/response/index.js +22 -0
- package/lib/response/index.js.map +1 -0
- package/lib/response/summarize-text-response.d.ts +30 -0
- package/lib/response/summarize-text-response.js +15 -0
- package/lib/response/summarize-text-response.js.map +1 -0
- package/package.json +29 -0
|
@@ -0,0 +1,106 @@
|
|
|
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 [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
|
+
* Details for the text generation request for Cohere models.
|
|
23
|
+
*/
|
|
24
|
+
export interface CohereLlmInferenceRequest extends model.LlmInferenceRequest {
|
|
25
|
+
/**
|
|
26
|
+
* Represents the prompt to be completed. The trailing white spaces are trimmed before completion.
|
|
27
|
+
*/
|
|
28
|
+
"prompt": string;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to stream back partial progress. If set, tokens are sent as data-only server-sent events as they become available.
|
|
31
|
+
*/
|
|
32
|
+
"isStream"?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The number of generated texts that will be returned. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
35
|
+
*/
|
|
36
|
+
"numGenerations"?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not to return the user prompt in the response. This option only applies to non-stream results.
|
|
39
|
+
*/
|
|
40
|
+
"isEcho"?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The maximum number of tokens to predict for each response. Includes input plus output tokens. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
43
|
+
*/
|
|
44
|
+
"maxTokens"?: number;
|
|
45
|
+
/**
|
|
46
|
+
* A number that sets the randomness of the generated output. A lower temperature means a less random generations.
|
|
47
|
+
* <p>
|
|
48
|
+
Use lower numbers for tasks with a correct answer 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.
|
|
49
|
+
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
50
|
+
*/
|
|
51
|
+
"temperature"?: number;
|
|
52
|
+
/**
|
|
53
|
+
* An integer that sets up the model to use only the top k most likely tokens in the generated output. A higher k introduces more randomness into the output making the output text sound more natural. Default value 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.
|
|
54
|
+
* <p>
|
|
55
|
+
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 the probabilities of the top 10 add up to .75, then only the top 10 tokens are chosen.
|
|
56
|
+
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
57
|
+
*/
|
|
58
|
+
"topK"?: number;
|
|
59
|
+
/**
|
|
60
|
+
* If set to a probability 0.0 < p < 1.0, it ensures that only the most likely tokens, with total probability mass of p, are considered for generation at each step.
|
|
61
|
+
* <p>
|
|
62
|
+
To eliminate tokens with low likelihood, assign p a minimum percentage for the next token's likelihood. For example, when p is set to 0.75, the model eliminates the bottom 25 percent for the next token. Set to 1.0 to consider all tokens and set to 0 to disable. If both k and p are enabled, p acts after k.
|
|
63
|
+
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
64
|
+
*/
|
|
65
|
+
"topP"?: number;
|
|
66
|
+
/**
|
|
67
|
+
* 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.
|
|
68
|
+
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
69
|
+
*/
|
|
70
|
+
"frequencyPenalty"?: number;
|
|
71
|
+
/**
|
|
72
|
+
* To reduce repetitiveness of generated tokens, this number penalizes new tokens based on whether they've appeared 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.
|
|
73
|
+
* <p>
|
|
74
|
+
Similar to frequency penalty, a penalty is applied to previously present tokens, except that this penalty is applied equally to all tokens that have already appeared, regardless of how many times they've appeared. Set to 0 to disable.
|
|
75
|
+
* Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
|
|
76
|
+
*/
|
|
77
|
+
"presencePenalty"?: number;
|
|
78
|
+
/**
|
|
79
|
+
* The generated text is cut at the end of the earliest occurrence of this stop sequence. The generated text will include this stop sequence.
|
|
80
|
+
*/
|
|
81
|
+
"stopSequences"?: Array<string>;
|
|
82
|
+
/**
|
|
83
|
+
* Specifies how and if the token likelihoods are returned with the response.
|
|
84
|
+
*/
|
|
85
|
+
"returnLikelihoods"?: CohereLlmInferenceRequest.ReturnLikelihoods;
|
|
86
|
+
/**
|
|
87
|
+
* For an input that's longer than the maximum token length, specifies which part of the input text will be truncated.
|
|
88
|
+
*/
|
|
89
|
+
"truncate"?: CohereLlmInferenceRequest.Truncate;
|
|
90
|
+
"runtimeType": string;
|
|
91
|
+
}
|
|
92
|
+
export declare namespace CohereLlmInferenceRequest {
|
|
93
|
+
enum ReturnLikelihoods {
|
|
94
|
+
None = "NONE",
|
|
95
|
+
All = "ALL",
|
|
96
|
+
Generation = "GENERATION"
|
|
97
|
+
}
|
|
98
|
+
enum Truncate {
|
|
99
|
+
None = "NONE",
|
|
100
|
+
Start = "START",
|
|
101
|
+
End = "END"
|
|
102
|
+
}
|
|
103
|
+
function getJsonObj(obj: CohereLlmInferenceRequest, isParentJsonObj?: boolean): object;
|
|
104
|
+
const runtimeType = "COHERE";
|
|
105
|
+
function getDeserializedJsonObj(obj: CohereLlmInferenceRequest, isParentJsonObj?: boolean): object;
|
|
106
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 [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.CohereLlmInferenceRequest = void 0;
|
|
42
|
+
const model = __importStar(require("../model"));
|
|
43
|
+
var CohereLlmInferenceRequest;
|
|
44
|
+
(function (CohereLlmInferenceRequest) {
|
|
45
|
+
let ReturnLikelihoods;
|
|
46
|
+
(function (ReturnLikelihoods) {
|
|
47
|
+
ReturnLikelihoods["None"] = "NONE";
|
|
48
|
+
ReturnLikelihoods["All"] = "ALL";
|
|
49
|
+
ReturnLikelihoods["Generation"] = "GENERATION";
|
|
50
|
+
})(ReturnLikelihoods = CohereLlmInferenceRequest.ReturnLikelihoods || (CohereLlmInferenceRequest.ReturnLikelihoods = {}));
|
|
51
|
+
let Truncate;
|
|
52
|
+
(function (Truncate) {
|
|
53
|
+
Truncate["None"] = "NONE";
|
|
54
|
+
Truncate["Start"] = "START";
|
|
55
|
+
Truncate["End"] = "END";
|
|
56
|
+
})(Truncate = CohereLlmInferenceRequest.Truncate || (CohereLlmInferenceRequest.Truncate = {}));
|
|
57
|
+
function getJsonObj(obj, isParentJsonObj) {
|
|
58
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj
|
|
59
|
+
? obj
|
|
60
|
+
: model.LlmInferenceRequest.getJsonObj(obj))), {});
|
|
61
|
+
return jsonObj;
|
|
62
|
+
}
|
|
63
|
+
CohereLlmInferenceRequest.getJsonObj = getJsonObj;
|
|
64
|
+
CohereLlmInferenceRequest.runtimeType = "COHERE";
|
|
65
|
+
function getDeserializedJsonObj(obj, isParentJsonObj) {
|
|
66
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj
|
|
67
|
+
? obj
|
|
68
|
+
: model.LlmInferenceRequest.getDeserializedJsonObj(obj))), {});
|
|
69
|
+
return jsonObj;
|
|
70
|
+
}
|
|
71
|
+
CohereLlmInferenceRequest.getDeserializedJsonObj = getDeserializedJsonObj;
|
|
72
|
+
})(CohereLlmInferenceRequest = exports.CohereLlmInferenceRequest || (exports.CohereLlmInferenceRequest = {}));
|
|
73
|
+
//# sourceMappingURL=cohere-llm-inference-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cohere-llm-inference-request.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/cohere-llm-inference-request.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AA4ElC,IAAiB,yBAAyB,CAqCzC;AArCD,WAAiB,yBAAyB;IACxC,IAAY,iBAIX;IAJD,WAAY,iBAAiB;QAC3B,kCAAa,CAAA;QACb,gCAAW,CAAA;QACX,8CAAyB,CAAA;IAC3B,CAAC,EAJW,iBAAiB,GAAjB,2CAAiB,KAAjB,2CAAiB,QAI5B;IAED,IAAY,QAIX;IAJD,WAAY,QAAQ;QAClB,yBAAa,CAAA;QACb,2BAAe,CAAA;QACf,uBAAW,CAAA;IACb,CAAC,EAJW,QAAQ,GAAR,kCAAQ,KAAR,kCAAQ,QAInB;IAED,SAAgB,UAAU,CAAC,GAA8B,EAAE,eAAyB;QAClF,MAAM,OAAO,mCACR,CAAC,eAAe;YACjB,CAAC,CAAC,GAAG;YACL,CAAC,CAAE,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,GAAG,CAA+B,CAAC,GAC1E,EAAE,CACN,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IATe,oCAAU,aASzB,CAAA;IACY,qCAAW,GAAG,QAAQ,CAAC;IACpC,SAAgB,sBAAsB,CACpC,GAA8B,EAC9B,eAAyB;QAEzB,MAAM,OAAO,mCACR,CAAC,eAAe;YACjB,CAAC,CAAC,GAAG;YACL,CAAC,CAAE,KAAK,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,GAAG,CAA+B,CAAC,GACtF,EAAE,CACN,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAZe,gDAAsB,yBAYrC,CAAA;AACH,CAAC,EArCgB,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAqCzC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 [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
|
+
* The generated text result to return.
|
|
23
|
+
*/
|
|
24
|
+
export interface CohereLlmInferenceResponse extends model.LlmInferenceResponse {
|
|
25
|
+
/**
|
|
26
|
+
* Each prompt in the input array has an array of GeneratedText, controlled by numGenerations parameter in the request.
|
|
27
|
+
*/
|
|
28
|
+
"generatedTexts": Array<model.GeneratedText>;
|
|
29
|
+
/**
|
|
30
|
+
* The date and time that the model was created in an RFC3339 formatted datetime string.
|
|
31
|
+
*/
|
|
32
|
+
"timeCreated": Date;
|
|
33
|
+
/**
|
|
34
|
+
* Represents the original prompt. Applies only to non-stream responses.
|
|
35
|
+
*/
|
|
36
|
+
"prompt"?: string;
|
|
37
|
+
"runtimeType": string;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace CohereLlmInferenceResponse {
|
|
40
|
+
function getJsonObj(obj: CohereLlmInferenceResponse, isParentJsonObj?: boolean): object;
|
|
41
|
+
const runtimeType = "COHERE";
|
|
42
|
+
function getDeserializedJsonObj(obj: CohereLlmInferenceResponse, isParentJsonObj?: boolean): object;
|
|
43
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 [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.CohereLlmInferenceResponse = void 0;
|
|
42
|
+
const model = __importStar(require("../model"));
|
|
43
|
+
var CohereLlmInferenceResponse;
|
|
44
|
+
(function (CohereLlmInferenceResponse) {
|
|
45
|
+
function getJsonObj(obj, isParentJsonObj) {
|
|
46
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj
|
|
47
|
+
? obj
|
|
48
|
+
: model.LlmInferenceResponse.getJsonObj(obj))), {
|
|
49
|
+
"generatedTexts": obj.generatedTexts
|
|
50
|
+
? obj.generatedTexts.map(item => {
|
|
51
|
+
return model.GeneratedText.getJsonObj(item);
|
|
52
|
+
})
|
|
53
|
+
: undefined
|
|
54
|
+
});
|
|
55
|
+
return jsonObj;
|
|
56
|
+
}
|
|
57
|
+
CohereLlmInferenceResponse.getJsonObj = getJsonObj;
|
|
58
|
+
CohereLlmInferenceResponse.runtimeType = "COHERE";
|
|
59
|
+
function getDeserializedJsonObj(obj, isParentJsonObj) {
|
|
60
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj
|
|
61
|
+
? obj
|
|
62
|
+
: model.LlmInferenceResponse.getDeserializedJsonObj(obj))), {
|
|
63
|
+
"generatedTexts": obj.generatedTexts
|
|
64
|
+
? obj.generatedTexts.map(item => {
|
|
65
|
+
return model.GeneratedText.getDeserializedJsonObj(item);
|
|
66
|
+
})
|
|
67
|
+
: undefined
|
|
68
|
+
});
|
|
69
|
+
return jsonObj;
|
|
70
|
+
}
|
|
71
|
+
CohereLlmInferenceResponse.getDeserializedJsonObj = getDeserializedJsonObj;
|
|
72
|
+
})(CohereLlmInferenceResponse = exports.CohereLlmInferenceResponse || (exports.CohereLlmInferenceResponse = {}));
|
|
73
|
+
//# sourceMappingURL=cohere-llm-inference-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cohere-llm-inference-response.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/cohere-llm-inference-response.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AAuBlC,IAAiB,0BAA0B,CAqC1C;AArCD,WAAiB,0BAA0B;IACzC,SAAgB,UAAU,CAAC,GAA+B,EAAE,eAAyB;QACnF,MAAM,OAAO,mCACR,CAAC,eAAe;YACjB,CAAC,CAAC,GAAG;YACL,CAAC,CAAE,KAAK,CAAC,oBAAoB,CAAC,UAAU,CAAC,GAAG,CAAgC,CAAC,GAC5E;YACD,gBAAgB,EAAE,GAAG,CAAC,cAAc;gBAClC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBAC5B,OAAO,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBAC9C,CAAC,CAAC;gBACJ,CAAC,CAAC,SAAS;SACd,CACF,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAfe,qCAAU,aAezB,CAAA;IACY,sCAAW,GAAG,QAAQ,CAAC;IACpC,SAAgB,sBAAsB,CACpC,GAA+B,EAC/B,eAAyB;QAEzB,MAAM,OAAO,mCACR,CAAC,eAAe;YACjB,CAAC,CAAC,GAAG;YACL,CAAC,CAAE,KAAK,CAAC,oBAAoB,CAAC,sBAAsB,CAAC,GAAG,CAAgC,CAAC,GACxF;YACD,gBAAgB,EAAE,GAAG,CAAC,cAAc;gBAClC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBAC5B,OAAO,KAAK,CAAC,aAAa,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;gBAC1D,CAAC,CAAC;gBACJ,CAAC,CAAC,SAAS;SACd,CACF,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAlBe,iDAAsB,yBAkBrC,CAAA;AACH,CAAC,EArCgB,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAqC1C"}
|
|
@@ -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 [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
|
+
* The model's serving mode is dedicated serving and has an endpoint on a dedicated AI cluster.
|
|
23
|
+
*/
|
|
24
|
+
export interface DedicatedServingMode extends model.ServingMode {
|
|
25
|
+
/**
|
|
26
|
+
* The OCID of the endpoint to use.
|
|
27
|
+
*/
|
|
28
|
+
"endpointId": string;
|
|
29
|
+
"servingType": string;
|
|
30
|
+
}
|
|
31
|
+
export declare namespace DedicatedServingMode {
|
|
32
|
+
function getJsonObj(obj: DedicatedServingMode, isParentJsonObj?: boolean): object;
|
|
33
|
+
const servingType = "DEDICATED";
|
|
34
|
+
function getDeserializedJsonObj(obj: DedicatedServingMode, isParentJsonObj?: boolean): object;
|
|
35
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 [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.DedicatedServingMode = void 0;
|
|
42
|
+
const model = __importStar(require("../model"));
|
|
43
|
+
var DedicatedServingMode;
|
|
44
|
+
(function (DedicatedServingMode) {
|
|
45
|
+
function getJsonObj(obj, isParentJsonObj) {
|
|
46
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj ? obj : model.ServingMode.getJsonObj(obj))), {});
|
|
47
|
+
return jsonObj;
|
|
48
|
+
}
|
|
49
|
+
DedicatedServingMode.getJsonObj = getJsonObj;
|
|
50
|
+
DedicatedServingMode.servingType = "DEDICATED";
|
|
51
|
+
function getDeserializedJsonObj(obj, isParentJsonObj) {
|
|
52
|
+
const jsonObj = Object.assign(Object.assign({}, (isParentJsonObj
|
|
53
|
+
? obj
|
|
54
|
+
: model.ServingMode.getDeserializedJsonObj(obj))), {});
|
|
55
|
+
return jsonObj;
|
|
56
|
+
}
|
|
57
|
+
DedicatedServingMode.getDeserializedJsonObj = getDeserializedJsonObj;
|
|
58
|
+
})(DedicatedServingMode = exports.DedicatedServingMode || (exports.DedicatedServingMode = {}));
|
|
59
|
+
//# sourceMappingURL=dedicated-serving-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dedicated-serving-mode.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/dedicated-serving-mode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AAelC,IAAiB,oBAAoB,CAuBpC;AAvBD,WAAiB,oBAAoB;IACnC,SAAgB,UAAU,CAAC,GAAyB,EAAE,eAAyB;QAC7E,MAAM,OAAO,mCACR,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAA0B,CAAC,GACrF,EAAE,CACN,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAPe,+BAAU,aAOzB,CAAA;IACY,gCAAW,GAAG,WAAW,CAAC;IACvC,SAAgB,sBAAsB,CACpC,GAAyB,EACzB,eAAyB;QAEzB,MAAM,OAAO,mCACR,CAAC,eAAe;YACjB,CAAC,CAAC,GAAG;YACL,CAAC,CAAE,KAAK,CAAC,WAAW,CAAC,sBAAsB,CAAC,GAAG,CAA0B,CAAC,GACzE,EAAE,CACN,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAZe,2CAAsB,yBAYrC,CAAA;AACH,CAAC,EAvBgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAuBpC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 [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
|
+
* Details for the request to embed texts.
|
|
23
|
+
*/
|
|
24
|
+
export interface EmbedTextDetails {
|
|
25
|
+
/**
|
|
26
|
+
* The list of strings for embeddings.
|
|
27
|
+
*/
|
|
28
|
+
"inputs": Array<string>;
|
|
29
|
+
"servingMode": model.DedicatedServingMode | model.OnDemandServingMode;
|
|
30
|
+
/**
|
|
31
|
+
* The OCID of compartment that the user is authorized to use to call into the Generative AI service.
|
|
32
|
+
*/
|
|
33
|
+
"compartmentId": string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether or not to include the original inputs in the response. Results are index-based.
|
|
36
|
+
*/
|
|
37
|
+
"isEcho"?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* For an input that's longer than the maximum token length, specifies which part of the input text will be truncated.
|
|
40
|
+
*/
|
|
41
|
+
"truncate"?: EmbedTextDetails.Truncate;
|
|
42
|
+
/**
|
|
43
|
+
* Specifies the input type.
|
|
44
|
+
*/
|
|
45
|
+
"inputType"?: EmbedTextDetails.InputType;
|
|
46
|
+
}
|
|
47
|
+
export declare namespace EmbedTextDetails {
|
|
48
|
+
enum Truncate {
|
|
49
|
+
None = "NONE",
|
|
50
|
+
Start = "START",
|
|
51
|
+
End = "END"
|
|
52
|
+
}
|
|
53
|
+
enum InputType {
|
|
54
|
+
SearchDocument = "SEARCH_DOCUMENT",
|
|
55
|
+
SearchQuery = "SEARCH_QUERY",
|
|
56
|
+
Classification = "CLASSIFICATION",
|
|
57
|
+
Clustering = "CLUSTERING"
|
|
58
|
+
}
|
|
59
|
+
function getJsonObj(obj: EmbedTextDetails): object;
|
|
60
|
+
function getDeserializedJsonObj(obj: EmbedTextDetails): object;
|
|
61
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 [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.EmbedTextDetails = void 0;
|
|
42
|
+
const model = __importStar(require("../model"));
|
|
43
|
+
var EmbedTextDetails;
|
|
44
|
+
(function (EmbedTextDetails) {
|
|
45
|
+
let Truncate;
|
|
46
|
+
(function (Truncate) {
|
|
47
|
+
Truncate["None"] = "NONE";
|
|
48
|
+
Truncate["Start"] = "START";
|
|
49
|
+
Truncate["End"] = "END";
|
|
50
|
+
})(Truncate = EmbedTextDetails.Truncate || (EmbedTextDetails.Truncate = {}));
|
|
51
|
+
let InputType;
|
|
52
|
+
(function (InputType) {
|
|
53
|
+
InputType["SearchDocument"] = "SEARCH_DOCUMENT";
|
|
54
|
+
InputType["SearchQuery"] = "SEARCH_QUERY";
|
|
55
|
+
InputType["Classification"] = "CLASSIFICATION";
|
|
56
|
+
InputType["Clustering"] = "CLUSTERING";
|
|
57
|
+
})(InputType = EmbedTextDetails.InputType || (EmbedTextDetails.InputType = {}));
|
|
58
|
+
function getJsonObj(obj) {
|
|
59
|
+
const jsonObj = Object.assign(Object.assign({}, obj), {
|
|
60
|
+
"servingMode": obj.servingMode ? model.ServingMode.getJsonObj(obj.servingMode) : undefined
|
|
61
|
+
});
|
|
62
|
+
return jsonObj;
|
|
63
|
+
}
|
|
64
|
+
EmbedTextDetails.getJsonObj = getJsonObj;
|
|
65
|
+
function getDeserializedJsonObj(obj) {
|
|
66
|
+
const jsonObj = Object.assign(Object.assign({}, obj), {
|
|
67
|
+
"servingMode": obj.servingMode
|
|
68
|
+
? model.ServingMode.getDeserializedJsonObj(obj.servingMode)
|
|
69
|
+
: undefined
|
|
70
|
+
});
|
|
71
|
+
return jsonObj;
|
|
72
|
+
}
|
|
73
|
+
EmbedTextDetails.getDeserializedJsonObj = getDeserializedJsonObj;
|
|
74
|
+
})(EmbedTextDetails = exports.EmbedTextDetails || (exports.EmbedTextDetails = {}));
|
|
75
|
+
//# sourceMappingURL=embed-text-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed-text-details.js","sourceRoot":"","sources":["../../../../../lib/generativeaiinference/lib/model/embed-text-details.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AA8BlC,IAAiB,gBAAgB,CAoChC;AApCD,WAAiB,gBAAgB;IAC/B,IAAY,QAIX;IAJD,WAAY,QAAQ;QAClB,yBAAa,CAAA;QACb,2BAAe,CAAA;QACf,uBAAW,CAAA;IACb,CAAC,EAJW,QAAQ,GAAR,yBAAQ,KAAR,yBAAQ,QAInB;IAED,IAAY,SAKX;IALD,WAAY,SAAS;QACnB,+CAAkC,CAAA;QAClC,yCAA4B,CAAA;QAC5B,8CAAiC,CAAA;QACjC,sCAAyB,CAAA;IAC3B,CAAC,EALW,SAAS,GAAT,0BAAS,KAAT,0BAAS,QAKpB;IAED,SAAgB,UAAU,CAAC,GAAqB;QAC9C,MAAM,OAAO,mCACR,GAAG,GACH;YACD,aAAa,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;SAC3F,CACF,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IATe,2BAAU,aASzB,CAAA;IACD,SAAgB,sBAAsB,CAAC,GAAqB;QAC1D,MAAM,OAAO,mCACR,GAAG,GACH;YACD,aAAa,EAAE,GAAG,CAAC,WAAW;gBAC5B,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,sBAAsB,CAAC,GAAG,CAAC,WAAW,CAAC;gBAC3D,CAAC,CAAC,SAAS;SACd,CACF,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAXe,uCAAsB,yBAWrC,CAAA;AACH,CAAC,EApCgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAoChC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 [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
|
+
/**
|
|
21
|
+
* The generated embedded result to return.
|
|
22
|
+
*/
|
|
23
|
+
export interface EmbedTextResult {
|
|
24
|
+
/**
|
|
25
|
+
* A unique identifier for the generated result.
|
|
26
|
+
*/
|
|
27
|
+
"id": string;
|
|
28
|
+
/**
|
|
29
|
+
* The original inputs. Only present if \"isEcho\" is set to true.
|
|
30
|
+
*/
|
|
31
|
+
"inputs"?: Array<string>;
|
|
32
|
+
/**
|
|
33
|
+
* The embeddings corresponding to inputs.
|
|
34
|
+
*/
|
|
35
|
+
"embeddings": Array<Array<number>>;
|
|
36
|
+
/**
|
|
37
|
+
* The OCID of the model used in this inference request.
|
|
38
|
+
*/
|
|
39
|
+
"modelId"?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The version of the model.
|
|
42
|
+
*/
|
|
43
|
+
"modelVersion"?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare namespace EmbedTextResult {
|
|
46
|
+
function getJsonObj(obj: EmbedTextResult): object;
|
|
47
|
+
function getDeserializedJsonObj(obj: EmbedTextResult): object;
|
|
48
|
+
}
|