@azure/ai-agents 1.0.0-alpha.20250502.6
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 +21 -0
- package/README.md +907 -0
- package/dist/browser/agentsClient.d.ts +110 -0
- package/dist/browser/agentsClient.d.ts.map +1 -0
- package/dist/browser/agentsClient.js +203 -0
- package/dist/browser/agentsClient.js.map +1 -0
- package/dist/browser/api/agentsContext.d.ts +15 -0
- package/dist/browser/api/agentsContext.d.ts.map +1 -0
- package/dist/browser/api/agentsContext.js +55 -0
- package/dist/browser/api/agentsContext.js.map +1 -0
- package/dist/browser/api/index.d.ts +4 -0
- package/dist/browser/api/index.d.ts.map +1 -0
- package/dist/browser/api/index.js +5 -0
- package/dist/browser/api/index.js.map +1 -0
- package/dist/browser/api/operations.d.ts +212 -0
- package/dist/browser/api/operations.d.ts.map +1 -0
- package/dist/browser/api/operations.js +1348 -0
- package/dist/browser/api/operations.js.map +1 -0
- package/dist/browser/api/options.d.ts +456 -0
- package/dist/browser/api/options.d.ts.map +1 -0
- package/dist/browser/api/options.js +4 -0
- package/dist/browser/api/options.js.map +1 -0
- package/dist/browser/api/poller.d.ts +9 -0
- package/dist/browser/api/poller.d.ts.map +1 -0
- package/dist/browser/api/poller.js +137 -0
- package/dist/browser/api/poller.js.map +1 -0
- package/dist/browser/constants.d.ts +9 -0
- package/dist/browser/constants.d.ts.map +1 -0
- package/dist/browser/constants.js +11 -0
- package/dist/browser/constants.js.map +1 -0
- package/dist/browser/index.d.ts +8 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +7 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/logger.js +5 -0
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/models/index.d.ts +3 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +5 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/models.d.ts +1977 -0
- package/dist/browser/models/models.d.ts.map +1 -0
- package/dist/browser/models/models.js +2053 -0
- package/dist/browser/models/models.js.map +1 -0
- package/dist/browser/models/streamingModels.d.ts +108 -0
- package/dist/browser/models/streamingModels.d.ts.map +1 -0
- package/dist/browser/models/streamingModels.js +75 -0
- package/dist/browser/models/streamingModels.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/static-helpers/multipartHelpers.d.ts +6 -0
- package/dist/browser/static-helpers/multipartHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/multipartHelpers.js +23 -0
- package/dist/browser/static-helpers/multipartHelpers.js.map +1 -0
- package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/browser/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/browser/static-helpers/urlTemplate.js +169 -0
- package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
- package/dist/browser/utils.d.ts +214 -0
- package/dist/browser/utils.d.ts.map +1 -0
- package/dist/browser/utils.js +311 -0
- package/dist/browser/utils.js.map +1 -0
- package/dist/commonjs/agentsClient.d.ts +110 -0
- package/dist/commonjs/agentsClient.d.ts.map +1 -0
- package/dist/commonjs/agentsClient.js +207 -0
- package/dist/commonjs/agentsClient.js.map +1 -0
- package/dist/commonjs/api/agentsContext.d.ts +15 -0
- package/dist/commonjs/api/agentsContext.d.ts.map +1 -0
- package/dist/commonjs/api/agentsContext.js +58 -0
- package/dist/commonjs/api/agentsContext.js.map +1 -0
- package/dist/commonjs/api/index.d.ts +4 -0
- package/dist/commonjs/api/index.d.ts.map +1 -0
- package/dist/commonjs/api/index.js +51 -0
- package/dist/commonjs/api/index.js.map +1 -0
- package/dist/commonjs/api/operations.d.ts +212 -0
- package/dist/commonjs/api/operations.d.ts.map +1 -0
- package/dist/commonjs/api/operations.js +1484 -0
- package/dist/commonjs/api/operations.js.map +1 -0
- package/dist/commonjs/api/options.d.ts +456 -0
- package/dist/commonjs/api/options.d.ts.map +1 -0
- package/dist/commonjs/api/options.js +5 -0
- package/dist/commonjs/api/options.js.map +1 -0
- package/dist/commonjs/api/poller.d.ts +9 -0
- package/dist/commonjs/api/poller.d.ts.map +1 -0
- package/dist/commonjs/api/poller.js +140 -0
- package/dist/commonjs/api/poller.js.map +1 -0
- package/dist/commonjs/constants.d.ts +9 -0
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js +14 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/commonjs/index.d.ts +8 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +13 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +3 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +10 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/models.d.ts +1977 -0
- package/dist/commonjs/models/models.d.ts.map +1 -0
- package/dist/commonjs/models/models.js +2340 -0
- package/dist/commonjs/models/models.js.map +1 -0
- package/dist/commonjs/models/streamingModels.d.ts +108 -0
- package/dist/commonjs/models/streamingModels.d.ts.map +1 -0
- package/dist/commonjs/models/streamingModels.js +78 -0
- package/dist/commonjs/models/streamingModels.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/static-helpers/multipartHelpers.d.ts +6 -0
- package/dist/commonjs/static-helpers/multipartHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/multipartHelpers.js +26 -0
- package/dist/commonjs/static-helpers/multipartHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/commonjs/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/urlTemplate.js +172 -0
- package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/utils.d.ts +214 -0
- package/dist/commonjs/utils.d.ts.map +1 -0
- package/dist/commonjs/utils.js +317 -0
- package/dist/commonjs/utils.js.map +1 -0
- package/dist/esm/agentsClient.d.ts +110 -0
- package/dist/esm/agentsClient.d.ts.map +1 -0
- package/dist/esm/agentsClient.js +203 -0
- package/dist/esm/agentsClient.js.map +1 -0
- package/dist/esm/api/agentsContext.d.ts +15 -0
- package/dist/esm/api/agentsContext.d.ts.map +1 -0
- package/dist/esm/api/agentsContext.js +55 -0
- package/dist/esm/api/agentsContext.js.map +1 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/api/index.d.ts.map +1 -0
- package/dist/esm/api/index.js +5 -0
- package/dist/esm/api/index.js.map +1 -0
- package/dist/esm/api/operations.d.ts +212 -0
- package/dist/esm/api/operations.d.ts.map +1 -0
- package/dist/esm/api/operations.js +1348 -0
- package/dist/esm/api/operations.js.map +1 -0
- package/dist/esm/api/options.d.ts +456 -0
- package/dist/esm/api/options.d.ts.map +1 -0
- package/dist/esm/api/options.js +4 -0
- package/dist/esm/api/options.js.map +1 -0
- package/dist/esm/api/poller.d.ts +9 -0
- package/dist/esm/api/poller.d.ts.map +1 -0
- package/dist/esm/api/poller.js +137 -0
- package/dist/esm/api/poller.js.map +1 -0
- package/dist/esm/constants.d.ts +9 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +11 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/models.d.ts +1977 -0
- package/dist/esm/models/models.d.ts.map +1 -0
- package/dist/esm/models/models.js +2053 -0
- package/dist/esm/models/models.js.map +1 -0
- package/dist/esm/models/streamingModels.d.ts +108 -0
- package/dist/esm/models/streamingModels.d.ts.map +1 -0
- package/dist/esm/models/streamingModels.js +75 -0
- package/dist/esm/models/streamingModels.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/static-helpers/multipartHelpers.d.ts +6 -0
- package/dist/esm/static-helpers/multipartHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/multipartHelpers.js +23 -0
- package/dist/esm/static-helpers/multipartHelpers.js.map +1 -0
- package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/esm/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/esm/static-helpers/urlTemplate.js +169 -0
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
- package/dist/esm/utils.d.ts +214 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/utils.js +311 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/react-native/agentsClient.d.ts +110 -0
- package/dist/react-native/agentsClient.d.ts.map +1 -0
- package/dist/react-native/agentsClient.js +203 -0
- package/dist/react-native/agentsClient.js.map +1 -0
- package/dist/react-native/api/agentsContext.d.ts +15 -0
- package/dist/react-native/api/agentsContext.d.ts.map +1 -0
- package/dist/react-native/api/agentsContext.js +55 -0
- package/dist/react-native/api/agentsContext.js.map +1 -0
- package/dist/react-native/api/index.d.ts +4 -0
- package/dist/react-native/api/index.d.ts.map +1 -0
- package/dist/react-native/api/index.js +5 -0
- package/dist/react-native/api/index.js.map +1 -0
- package/dist/react-native/api/operations.d.ts +212 -0
- package/dist/react-native/api/operations.d.ts.map +1 -0
- package/dist/react-native/api/operations.js +1348 -0
- package/dist/react-native/api/operations.js.map +1 -0
- package/dist/react-native/api/options.d.ts +456 -0
- package/dist/react-native/api/options.d.ts.map +1 -0
- package/dist/react-native/api/options.js +4 -0
- package/dist/react-native/api/options.js.map +1 -0
- package/dist/react-native/api/poller.d.ts +9 -0
- package/dist/react-native/api/poller.d.ts.map +1 -0
- package/dist/react-native/api/poller.js +137 -0
- package/dist/react-native/api/poller.js.map +1 -0
- package/dist/react-native/constants.d.ts +9 -0
- package/dist/react-native/constants.d.ts.map +1 -0
- package/dist/react-native/constants.js +11 -0
- package/dist/react-native/constants.js.map +1 -0
- package/dist/react-native/index.d.ts +8 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +7 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models/index.d.ts +3 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +5 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/models.d.ts +1977 -0
- package/dist/react-native/models/models.d.ts.map +1 -0
- package/dist/react-native/models/models.js +2053 -0
- package/dist/react-native/models/models.js.map +1 -0
- package/dist/react-native/models/streamingModels.d.ts +108 -0
- package/dist/react-native/models/streamingModels.d.ts.map +1 -0
- package/dist/react-native/models/streamingModels.js +75 -0
- package/dist/react-native/models/streamingModels.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/static-helpers/multipartHelpers.d.ts +6 -0
- package/dist/react-native/static-helpers/multipartHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/multipartHelpers.js +23 -0
- package/dist/react-native/static-helpers/multipartHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/react-native/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/react-native/static-helpers/urlTemplate.js +169 -0
- package/dist/react-native/static-helpers/urlTemplate.js.map +1 -0
- package/dist/react-native/utils.d.ts +214 -0
- package/dist/react-native/utils.d.ts.map +1 -0
- package/dist/react-native/utils.js +311 -0
- package/dist/react-native/utils.js.map +1 -0
- package/package.json +159 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { AgentsClientOptionalParams } from "./api/index.js";
|
|
2
|
+
import { Agent, OpenAIPageableListOfAgent, AgentDeletionStatus, MessageRole, MessageInputContent, AgentThread, ThreadDeletionStatus, OpenAIPageableListOfAgentThread, ThreadMessage, OpenAIPageableListOfThreadMessage, ThreadRun, OpenAIPageableListOfThreadRun, ToolOutput, RunStep, OpenAIPageableListOfRunStep, FileListResponse, OpenAIFile, FilePurpose, FileDeletionStatus, OpenAIPageableListOfVectorStore, VectorStore, VectorStoreDeletionStatus, OpenAIPageableListOfVectorStoreFile, VectorStoreFile, VectorStoreFileDeletionStatus, VectorStoreFileBatch } from "./models/models.js";
|
|
3
|
+
import { ListVectorStoreFileBatchFilesOptionalParams, CancelVectorStoreFileBatchOptionalParams, GetVectorStoreFileBatchOptionalParams, CreateVectorStoreFileBatchOptionalParams, DeleteVectorStoreFileOptionalParams, GetVectorStoreFileOptionalParams, CreateVectorStoreFileOptionalParams, ListVectorStoreFilesOptionalParams, DeleteVectorStoreOptionalParams, ModifyVectorStoreOptionalParams, GetVectorStoreOptionalParams, CreateVectorStoreOptionalParams, ListVectorStoresOptionalParams, GetFileContentOptionalParams, GetFileOptionalParams, DeleteFileOptionalParams, UploadFileOptionalParams, ListFilesOptionalParams, ListRunStepsOptionalParams, GetRunStepOptionalParams, CreateThreadAndRunOptionalParams, CancelRunOptionalParams, SubmitToolOutputsToRunOptionalParams, UpdateRunOptionalParams, GetRunOptionalParams, ListRunsOptionalParams, CreateRunOptionalParams, UpdateMessageOptionalParams, GetMessageOptionalParams, ListMessagesOptionalParams, CreateMessageOptionalParams, ListThreadsOptionalParams, DeleteThreadOptionalParams, UpdateThreadOptionalParams, GetThreadOptionalParams, CreateThreadOptionalParams, DeleteAgentOptionalParams, UpdateAgentOptionalParams, GetAgentOptionalParams, ListAgentsOptionalParams, CreateAgentOptionalParams } from "./api/options.js";
|
|
4
|
+
import { Pipeline } from "@azure/core-rest-pipeline";
|
|
5
|
+
import { KeyCredential, TokenCredential } from "@azure/core-auth";
|
|
6
|
+
import { OperationState, PollerLike } from "@azure/core-lro";
|
|
7
|
+
import { AgentRunResponse } from "./models/streamingModels.js";
|
|
8
|
+
export { AgentsClientOptionalParams } from "./api/agentsContext.js";
|
|
9
|
+
export declare class AgentsClient {
|
|
10
|
+
private _client;
|
|
11
|
+
/** The pipeline used by this client to make requests */
|
|
12
|
+
readonly pipeline: Pipeline;
|
|
13
|
+
constructor(endpointParam: string, credential: KeyCredential | TokenCredential, options?: AgentsClientOptionalParams);
|
|
14
|
+
/** Returns a list of vector store files in a batch. */
|
|
15
|
+
listVectorStoreFileBatchFiles(vectorStoreId: string, batchId: string, options?: ListVectorStoreFileBatchFilesOptionalParams): Promise<OpenAIPageableListOfVectorStoreFile>;
|
|
16
|
+
/** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */
|
|
17
|
+
cancelVectorStoreFileBatch(vectorStoreId: string, batchId: string, options?: CancelVectorStoreFileBatchOptionalParams): Promise<VectorStoreFileBatch>;
|
|
18
|
+
/** Retrieve a vector store file batch. */
|
|
19
|
+
getVectorStoreFileBatch(vectorStoreId: string, batchId: string, options?: GetVectorStoreFileBatchOptionalParams): Promise<VectorStoreFileBatch>;
|
|
20
|
+
/** Create a vector store file batch. */
|
|
21
|
+
createVectorStoreFileBatch(vectorStoreId: string, options?: CreateVectorStoreFileBatchOptionalParams): Promise<VectorStoreFileBatch>;
|
|
22
|
+
/** Create a vector store file batch and poll. */
|
|
23
|
+
createVectorStoreFileBatchAndPoll(vectorStoreId: string, options?: CreateVectorStoreFileBatchOptionalParams): PollerLike<OperationState<VectorStoreFileBatch>, VectorStoreFileBatch>;
|
|
24
|
+
/**
|
|
25
|
+
* Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted.
|
|
26
|
+
* To delete the file, use the delete file endpoint.
|
|
27
|
+
*/
|
|
28
|
+
deleteVectorStoreFile(vectorStoreId: string, fileId: string, options?: DeleteVectorStoreFileOptionalParams): Promise<VectorStoreFileDeletionStatus>;
|
|
29
|
+
/** Retrieves a vector store file. */
|
|
30
|
+
getVectorStoreFile(vectorStoreId: string, fileId: string, options?: GetVectorStoreFileOptionalParams): Promise<VectorStoreFile>;
|
|
31
|
+
/** Create a vector store file by attaching a file to a vector store. */
|
|
32
|
+
createVectorStoreFile(vectorStoreId: string, options?: CreateVectorStoreFileOptionalParams): Promise<VectorStoreFile>;
|
|
33
|
+
/** Create a vector store file by attaching a file to a vector store and poll. */
|
|
34
|
+
createVectorStoreFileAndPoll(vectorStoreId: string, options?: CreateVectorStoreFileOptionalParams): PollerLike<OperationState<VectorStoreFile>, VectorStoreFile>;
|
|
35
|
+
/** Returns a list of vector store files. */
|
|
36
|
+
listVectorStoreFiles(vectorStoreId: string, options?: ListVectorStoreFilesOptionalParams): Promise<OpenAIPageableListOfVectorStoreFile>;
|
|
37
|
+
/** Deletes the vector store object matching the specified ID. */
|
|
38
|
+
deleteVectorStore(vectorStoreId: string, options?: DeleteVectorStoreOptionalParams): Promise<VectorStoreDeletionStatus>;
|
|
39
|
+
/** The ID of the vector store to modify. */
|
|
40
|
+
modifyVectorStore(vectorStoreId: string, options?: ModifyVectorStoreOptionalParams): Promise<VectorStore>;
|
|
41
|
+
/** Returns the vector store object matching the specified ID. */
|
|
42
|
+
getVectorStore(vectorStoreId: string, options?: GetVectorStoreOptionalParams): Promise<VectorStore>;
|
|
43
|
+
/** Creates a vector store. */
|
|
44
|
+
createVectorStore(options?: CreateVectorStoreOptionalParams): Promise<VectorStore>;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a vector store and poll.
|
|
47
|
+
*/
|
|
48
|
+
createVectorStoreAndPoll(options?: CreateVectorStoreOptionalParams): PollerLike<OperationState<VectorStore>, VectorStore>;
|
|
49
|
+
/** Returns a list of vector stores. */
|
|
50
|
+
listVectorStores(options?: ListVectorStoresOptionalParams): Promise<OpenAIPageableListOfVectorStore>;
|
|
51
|
+
/** Retrieves the raw content of a specific file. */
|
|
52
|
+
getFileContent(fileId: string, options?: GetFileContentOptionalParams): Promise<Uint8Array>;
|
|
53
|
+
/** Returns information about a specific file. Does not retrieve file content. */
|
|
54
|
+
getFile(fileId: string, options?: GetFileOptionalParams): Promise<OpenAIFile>;
|
|
55
|
+
/** Delete a previously uploaded file. */
|
|
56
|
+
deleteFile(fileId: string, options?: DeleteFileOptionalParams): Promise<FileDeletionStatus>;
|
|
57
|
+
/** Uploads a file for use by other operations. */
|
|
58
|
+
uploadFile(file: ReadableStream | NodeJS.ReadableStream, purpose: FilePurpose, options?: UploadFileOptionalParams): Promise<OpenAIFile>;
|
|
59
|
+
/** Uploads a file for use by other operations and returns a poller to track the status of the operation. */
|
|
60
|
+
uploadFileAndPoll(file: ReadableStream | NodeJS.ReadableStream, purpose: FilePurpose, options?: UploadFileOptionalParams): PollerLike<OperationState<OpenAIFile>, OpenAIFile>;
|
|
61
|
+
/** Gets a list of previously uploaded files. */
|
|
62
|
+
listFiles(options?: ListFilesOptionalParams): Promise<FileListResponse>;
|
|
63
|
+
/** Gets a list of run steps from a thread run. */
|
|
64
|
+
listRunSteps(threadId: string, runId: string, options?: ListRunStepsOptionalParams): Promise<OpenAIPageableListOfRunStep>;
|
|
65
|
+
/** Gets a single run step from a thread run. */
|
|
66
|
+
getRunStep(threadId: string, runId: string, stepId: string, options?: GetRunStepOptionalParams): Promise<RunStep>;
|
|
67
|
+
/** Creates a new agent thread and immediately starts a run using that new thread. */
|
|
68
|
+
createThreadAndRun(assistantId: string, options?: CreateThreadAndRunOptionalParams): AgentRunResponse;
|
|
69
|
+
/** Cancels a run of an in progress thread. */
|
|
70
|
+
cancelRun(threadId: string, runId: string, options?: CancelRunOptionalParams): Promise<ThreadRun>;
|
|
71
|
+
/** Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. */
|
|
72
|
+
submitToolOutputsToRun(threadId: string, runId: string, toolOutputs: ToolOutput[], options?: SubmitToolOutputsToRunOptionalParams): Promise<ThreadRun>;
|
|
73
|
+
/** Modifies an existing thread run. */
|
|
74
|
+
updateRun(threadId: string, runId: string, options?: UpdateRunOptionalParams): Promise<ThreadRun>;
|
|
75
|
+
/** Gets an existing run from an existing thread. */
|
|
76
|
+
getRun(threadId: string, runId: string, options?: GetRunOptionalParams): Promise<ThreadRun>;
|
|
77
|
+
/** Gets a list of runs for a specified thread. */
|
|
78
|
+
listRuns(threadId: string, options?: ListRunsOptionalParams): Promise<OpenAIPageableListOfThreadRun>;
|
|
79
|
+
/** Creates a new run for an agent thread. */
|
|
80
|
+
createRun(threadId: string, assistantId: string, options?: CreateRunOptionalParams): AgentRunResponse;
|
|
81
|
+
/** Modifies an existing message on an existing thread. */
|
|
82
|
+
updateMessage(threadId: string, messageId: string, options?: UpdateMessageOptionalParams): Promise<ThreadMessage>;
|
|
83
|
+
/** Gets an existing message from an existing thread. */
|
|
84
|
+
getMessage(threadId: string, messageId: string, options?: GetMessageOptionalParams): Promise<ThreadMessage>;
|
|
85
|
+
/** Gets a list of messages that exist on a thread. */
|
|
86
|
+
listMessages(threadId: string, options?: ListMessagesOptionalParams): Promise<OpenAIPageableListOfThreadMessage>;
|
|
87
|
+
/** Creates a new message on a specified thread. */
|
|
88
|
+
createMessage(threadId: string, role: MessageRole, content: MessageInputContent, options?: CreateMessageOptionalParams): Promise<ThreadMessage>;
|
|
89
|
+
/** Gets a list of threads that were previously created. */
|
|
90
|
+
listThreads(options?: ListThreadsOptionalParams): Promise<OpenAIPageableListOfAgentThread>;
|
|
91
|
+
/** Deletes an existing thread. */
|
|
92
|
+
deleteThread(threadId: string, options?: DeleteThreadOptionalParams): Promise<ThreadDeletionStatus>;
|
|
93
|
+
/** Modifies an existing thread. */
|
|
94
|
+
updateThread(threadId: string, options?: UpdateThreadOptionalParams): Promise<AgentThread>;
|
|
95
|
+
/** Gets information about an existing thread. */
|
|
96
|
+
getThread(threadId: string, options?: GetThreadOptionalParams): Promise<AgentThread>;
|
|
97
|
+
/** Creates a new thread. Threads contain messages and can be run by agents. */
|
|
98
|
+
createThread(options?: CreateThreadOptionalParams): Promise<AgentThread>;
|
|
99
|
+
/** Deletes an agent. */
|
|
100
|
+
deleteAgent(assistantId: string, options?: DeleteAgentOptionalParams): Promise<AgentDeletionStatus>;
|
|
101
|
+
/** Modifies an existing agent. */
|
|
102
|
+
updateAgent(assistantId: string, options?: UpdateAgentOptionalParams): Promise<Agent>;
|
|
103
|
+
/** Retrieves an existing agent. */
|
|
104
|
+
getAgent(assistantId: string, options?: GetAgentOptionalParams): Promise<Agent>;
|
|
105
|
+
/** Gets a list of agents that were previously created. */
|
|
106
|
+
listAgents(options?: ListAgentsOptionalParams): Promise<OpenAIPageableListOfAgent>;
|
|
107
|
+
/** Creates a new agent. */
|
|
108
|
+
createAgent(model: string, options?: CreateAgentOptionalParams): Promise<Agent>;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=agentsClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentsClient.d.ts","sourceRoot":"","sources":["../../src/agentsClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAA+B,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EACL,KAAK,EACL,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,+BAA+B,EAC/B,aAAa,EACb,iCAAiC,EACjC,SAAS,EACT,6BAA6B,EAC7B,UAAU,EACV,OAAO,EACP,2BAA2B,EAC3B,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,+BAA+B,EAC/B,WAAW,EACX,yBAAyB,EACzB,mCAAmC,EACnC,eAAe,EACf,6BAA6B,EAC7B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BAAmB,CAAC;IAI/B,kCAAkC;IAClC,WAAW,CACT,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,yBAAkD,GAC1D,OAAO,CAAC,KAAK,CAAC;IAIjB,mCAAmC;IACnC,QAAQ,CACN,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,sBAA+C,GACvD,OAAO,CAAC,KAAK,CAAC;IAIjB,0DAA0D;IAC1D,UAAU,CACR,OAAO,GAAE,wBAAiD,GACzD,OAAO,CAAC,yBAAyB,CAAC;IAIrC,2BAA2B;IAC3B,WAAW,CACT,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,yBAAkD,GAC1D,OAAO,CAAC,KAAK,CAAC;CAGlB"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { createAgents } from "./api/index.js";
|
|
4
|
+
import { listVectorStoreFileBatchFiles, cancelVectorStoreFileBatch, getVectorStoreFileBatch, createVectorStoreFileBatch, deleteVectorStoreFile, getVectorStoreFile, createVectorStoreFile, listVectorStoreFiles, deleteVectorStore, modifyVectorStore, getVectorStore, createVectorStore, listVectorStores, getFileContent, getFile, deleteFile, uploadFile, listFiles, listRunSteps, getRunStep, createThreadAndRun, cancelRun, submitToolOutputsToRun, updateRun, getRun, listRuns, createRun, updateMessage, getMessage, listMessages, createMessage, listThreads, deleteThread, updateThread, getThread, createThread, deleteAgent, updateAgent, getAgent, listAgents, createAgent, uploadFileAndPoll, createVectorStoreFileAndPoll, createVectorStoreFileBatchAndPoll, createVectorStoreAndPoll, } from "./api/operations.js";
|
|
5
|
+
export class AgentsClient {
|
|
6
|
+
constructor(endpointParam, credential, options = {}) {
|
|
7
|
+
var _a;
|
|
8
|
+
const prefixFromOptions = (_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix;
|
|
9
|
+
const userAgentPrefix = prefixFromOptions
|
|
10
|
+
? `${prefixFromOptions} azsdk-js-client`
|
|
11
|
+
: `azsdk-js-client`;
|
|
12
|
+
this._client = createAgents(endpointParam, credential, Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix } }));
|
|
13
|
+
this.pipeline = this._client.pipeline;
|
|
14
|
+
}
|
|
15
|
+
/** Returns a list of vector store files in a batch. */
|
|
16
|
+
listVectorStoreFileBatchFiles(vectorStoreId, batchId, options = {
|
|
17
|
+
requestOptions: {},
|
|
18
|
+
}) {
|
|
19
|
+
return listVectorStoreFileBatchFiles(this._client, vectorStoreId, batchId, options);
|
|
20
|
+
}
|
|
21
|
+
/** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */
|
|
22
|
+
cancelVectorStoreFileBatch(vectorStoreId, batchId, options = { requestOptions: {} }) {
|
|
23
|
+
return cancelVectorStoreFileBatch(this._client, vectorStoreId, batchId, options);
|
|
24
|
+
}
|
|
25
|
+
/** Retrieve a vector store file batch. */
|
|
26
|
+
getVectorStoreFileBatch(vectorStoreId, batchId, options = { requestOptions: {} }) {
|
|
27
|
+
return getVectorStoreFileBatch(this._client, vectorStoreId, batchId, options);
|
|
28
|
+
}
|
|
29
|
+
/** Create a vector store file batch. */
|
|
30
|
+
createVectorStoreFileBatch(vectorStoreId, options = { requestOptions: {} }) {
|
|
31
|
+
return createVectorStoreFileBatch(this._client, vectorStoreId, options);
|
|
32
|
+
}
|
|
33
|
+
/** Create a vector store file batch and poll. */
|
|
34
|
+
createVectorStoreFileBatchAndPoll(vectorStoreId, options = { requestOptions: {} }) {
|
|
35
|
+
return createVectorStoreFileBatchAndPoll(this._client, vectorStoreId, options);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted.
|
|
39
|
+
* To delete the file, use the delete file endpoint.
|
|
40
|
+
*/
|
|
41
|
+
deleteVectorStoreFile(vectorStoreId, fileId, options = { requestOptions: {} }) {
|
|
42
|
+
return deleteVectorStoreFile(this._client, vectorStoreId, fileId, options);
|
|
43
|
+
}
|
|
44
|
+
/** Retrieves a vector store file. */
|
|
45
|
+
getVectorStoreFile(vectorStoreId, fileId, options = { requestOptions: {} }) {
|
|
46
|
+
return getVectorStoreFile(this._client, vectorStoreId, fileId, options);
|
|
47
|
+
}
|
|
48
|
+
/** Create a vector store file by attaching a file to a vector store. */
|
|
49
|
+
createVectorStoreFile(vectorStoreId, options = { requestOptions: {} }) {
|
|
50
|
+
return createVectorStoreFile(this._client, vectorStoreId, options);
|
|
51
|
+
}
|
|
52
|
+
/** Create a vector store file by attaching a file to a vector store and poll. */
|
|
53
|
+
createVectorStoreFileAndPoll(vectorStoreId, options = { requestOptions: {} }) {
|
|
54
|
+
return createVectorStoreFileAndPoll(this._client, vectorStoreId, options);
|
|
55
|
+
}
|
|
56
|
+
/** Returns a list of vector store files. */
|
|
57
|
+
listVectorStoreFiles(vectorStoreId, options = { requestOptions: {} }) {
|
|
58
|
+
return listVectorStoreFiles(this._client, vectorStoreId, options);
|
|
59
|
+
}
|
|
60
|
+
/** Deletes the vector store object matching the specified ID. */
|
|
61
|
+
deleteVectorStore(vectorStoreId, options = { requestOptions: {} }) {
|
|
62
|
+
return deleteVectorStore(this._client, vectorStoreId, options);
|
|
63
|
+
}
|
|
64
|
+
/** The ID of the vector store to modify. */
|
|
65
|
+
modifyVectorStore(vectorStoreId, options = { requestOptions: {} }) {
|
|
66
|
+
return modifyVectorStore(this._client, vectorStoreId, options);
|
|
67
|
+
}
|
|
68
|
+
/** Returns the vector store object matching the specified ID. */
|
|
69
|
+
getVectorStore(vectorStoreId, options = { requestOptions: {} }) {
|
|
70
|
+
return getVectorStore(this._client, vectorStoreId, options);
|
|
71
|
+
}
|
|
72
|
+
/** Creates a vector store. */
|
|
73
|
+
createVectorStore(options = { requestOptions: {} }) {
|
|
74
|
+
return createVectorStore(this._client, options);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Creates a vector store and poll.
|
|
78
|
+
*/
|
|
79
|
+
createVectorStoreAndPoll(options = { requestOptions: {} }) {
|
|
80
|
+
return createVectorStoreAndPoll(this._client, options);
|
|
81
|
+
}
|
|
82
|
+
/** Returns a list of vector stores. */
|
|
83
|
+
listVectorStores(options = { requestOptions: {} }) {
|
|
84
|
+
return listVectorStores(this._client, options);
|
|
85
|
+
}
|
|
86
|
+
/** Retrieves the raw content of a specific file. */
|
|
87
|
+
getFileContent(fileId, options = { requestOptions: {} }) {
|
|
88
|
+
return getFileContent(this._client, fileId, options);
|
|
89
|
+
}
|
|
90
|
+
/** Returns information about a specific file. Does not retrieve file content. */
|
|
91
|
+
getFile(fileId, options = { requestOptions: {} }) {
|
|
92
|
+
return getFile(this._client, fileId, options);
|
|
93
|
+
}
|
|
94
|
+
/** Delete a previously uploaded file. */
|
|
95
|
+
deleteFile(fileId, options = { requestOptions: {} }) {
|
|
96
|
+
return deleteFile(this._client, fileId, options);
|
|
97
|
+
}
|
|
98
|
+
/** Uploads a file for use by other operations. */
|
|
99
|
+
uploadFile(file, purpose, options = { requestOptions: {} }) {
|
|
100
|
+
return uploadFile(this._client, { file: file, purpose: purpose, filename: options.fileName }, options);
|
|
101
|
+
}
|
|
102
|
+
/** Uploads a file for use by other operations and returns a poller to track the status of the operation. */
|
|
103
|
+
uploadFileAndPoll(file, purpose, options = { requestOptions: {} }) {
|
|
104
|
+
return uploadFileAndPoll(this._client, { file: file, purpose: purpose, filename: options.fileName }, options);
|
|
105
|
+
}
|
|
106
|
+
/** Gets a list of previously uploaded files. */
|
|
107
|
+
listFiles(options = { requestOptions: {} }) {
|
|
108
|
+
return listFiles(this._client, options);
|
|
109
|
+
}
|
|
110
|
+
/** Gets a list of run steps from a thread run. */
|
|
111
|
+
listRunSteps(threadId, runId, options = { requestOptions: {} }) {
|
|
112
|
+
return listRunSteps(this._client, threadId, runId, options);
|
|
113
|
+
}
|
|
114
|
+
/** Gets a single run step from a thread run. */
|
|
115
|
+
getRunStep(threadId, runId, stepId, options = { requestOptions: {} }) {
|
|
116
|
+
return getRunStep(this._client, threadId, runId, stepId, options);
|
|
117
|
+
}
|
|
118
|
+
/** Creates a new agent thread and immediately starts a run using that new thread. */
|
|
119
|
+
createThreadAndRun(assistantId, options = { requestOptions: {} }) {
|
|
120
|
+
return createThreadAndRun(this._client, assistantId, options);
|
|
121
|
+
}
|
|
122
|
+
/** Cancels a run of an in progress thread. */
|
|
123
|
+
cancelRun(threadId, runId, options = { requestOptions: {} }) {
|
|
124
|
+
return cancelRun(this._client, threadId, runId, options);
|
|
125
|
+
}
|
|
126
|
+
/** Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. */
|
|
127
|
+
submitToolOutputsToRun(threadId, runId, toolOutputs, options = { requestOptions: {} }) {
|
|
128
|
+
return submitToolOutputsToRun(this._client, threadId, runId, toolOutputs, options);
|
|
129
|
+
}
|
|
130
|
+
/** Modifies an existing thread run. */
|
|
131
|
+
updateRun(threadId, runId, options = { requestOptions: {} }) {
|
|
132
|
+
return updateRun(this._client, threadId, runId, options);
|
|
133
|
+
}
|
|
134
|
+
/** Gets an existing run from an existing thread. */
|
|
135
|
+
getRun(threadId, runId, options = { requestOptions: {} }) {
|
|
136
|
+
return getRun(this._client, threadId, runId, options);
|
|
137
|
+
}
|
|
138
|
+
/** Gets a list of runs for a specified thread. */
|
|
139
|
+
listRuns(threadId, options = { requestOptions: {} }) {
|
|
140
|
+
return listRuns(this._client, threadId, options);
|
|
141
|
+
}
|
|
142
|
+
/** Creates a new run for an agent thread. */
|
|
143
|
+
createRun(threadId, assistantId, options = { requestOptions: {} }) {
|
|
144
|
+
return createRun(this._client, threadId, assistantId, options);
|
|
145
|
+
}
|
|
146
|
+
/** Modifies an existing message on an existing thread. */
|
|
147
|
+
updateMessage(threadId, messageId, options = { requestOptions: {} }) {
|
|
148
|
+
return updateMessage(this._client, threadId, messageId, options);
|
|
149
|
+
}
|
|
150
|
+
/** Gets an existing message from an existing thread. */
|
|
151
|
+
getMessage(threadId, messageId, options = { requestOptions: {} }) {
|
|
152
|
+
return getMessage(this._client, threadId, messageId, options);
|
|
153
|
+
}
|
|
154
|
+
/** Gets a list of messages that exist on a thread. */
|
|
155
|
+
listMessages(threadId, options = { requestOptions: {} }) {
|
|
156
|
+
return listMessages(this._client, threadId, options);
|
|
157
|
+
}
|
|
158
|
+
/** Creates a new message on a specified thread. */
|
|
159
|
+
createMessage(threadId, role, content, options = { requestOptions: {} }) {
|
|
160
|
+
return createMessage(this._client, threadId, role, content, options);
|
|
161
|
+
}
|
|
162
|
+
/** Gets a list of threads that were previously created. */
|
|
163
|
+
listThreads(options = { requestOptions: {} }) {
|
|
164
|
+
return listThreads(this._client, options);
|
|
165
|
+
}
|
|
166
|
+
/** Deletes an existing thread. */
|
|
167
|
+
deleteThread(threadId, options = { requestOptions: {} }) {
|
|
168
|
+
return deleteThread(this._client, threadId, options);
|
|
169
|
+
}
|
|
170
|
+
/** Modifies an existing thread. */
|
|
171
|
+
updateThread(threadId, options = { requestOptions: {} }) {
|
|
172
|
+
return updateThread(this._client, threadId, options);
|
|
173
|
+
}
|
|
174
|
+
/** Gets information about an existing thread. */
|
|
175
|
+
getThread(threadId, options = { requestOptions: {} }) {
|
|
176
|
+
return getThread(this._client, threadId, options);
|
|
177
|
+
}
|
|
178
|
+
/** Creates a new thread. Threads contain messages and can be run by agents. */
|
|
179
|
+
createThread(options = { requestOptions: {} }) {
|
|
180
|
+
return createThread(this._client, options);
|
|
181
|
+
}
|
|
182
|
+
/** Deletes an agent. */
|
|
183
|
+
deleteAgent(assistantId, options = { requestOptions: {} }) {
|
|
184
|
+
return deleteAgent(this._client, assistantId, options);
|
|
185
|
+
}
|
|
186
|
+
/** Modifies an existing agent. */
|
|
187
|
+
updateAgent(assistantId, options = { requestOptions: {} }) {
|
|
188
|
+
return updateAgent(this._client, assistantId, options);
|
|
189
|
+
}
|
|
190
|
+
/** Retrieves an existing agent. */
|
|
191
|
+
getAgent(assistantId, options = { requestOptions: {} }) {
|
|
192
|
+
return getAgent(this._client, assistantId, options);
|
|
193
|
+
}
|
|
194
|
+
/** Gets a list of agents that were previously created. */
|
|
195
|
+
listAgents(options = { requestOptions: {} }) {
|
|
196
|
+
return listAgents(this._client, options);
|
|
197
|
+
}
|
|
198
|
+
/** Creates a new agent. */
|
|
199
|
+
createAgent(model, options = { requestOptions: {} }) {
|
|
200
|
+
return createAgent(this._client, model, options);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=agentsClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentsClient.js","sourceRoot":"","sources":["../../src/agentsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAA6C,MAAM,gBAAgB,CAAC;AAwEzF,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,sBAAsB,EACtB,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,aAAa,EACb,UAAU,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,EACR,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,4BAA4B,EAC5B,iCAAiC,EACjC,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAQ7B,MAAM,OAAO,YAAY;IAKvB,YACE,aAAqB,EACrB,UAA2C,EAC3C,UAAsC,EAAE;;QAExC,MAAM,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AAE,EAAE;QAE3D,OAAO,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createAgents, AgentsContext, AgentsClientOptionalParams } from \"./api/index.js\";\nimport {\n Agent,\n OpenAIPageableListOfAgent,\n AgentDeletionStatus,\n MessageRole,\n MessageInputContent,\n AgentThread,\n ThreadDeletionStatus,\n OpenAIPageableListOfAgentThread,\n ThreadMessage,\n OpenAIPageableListOfThreadMessage,\n ThreadRun,\n OpenAIPageableListOfThreadRun,\n ToolOutput,\n RunStep,\n OpenAIPageableListOfRunStep,\n FileListResponse,\n OpenAIFile,\n FilePurpose,\n FileDeletionStatus,\n OpenAIPageableListOfVectorStore,\n VectorStore,\n VectorStoreDeletionStatus,\n OpenAIPageableListOfVectorStoreFile,\n VectorStoreFile,\n VectorStoreFileDeletionStatus,\n VectorStoreFileBatch,\n} from \"./models/models.js\";\nimport {\n ListVectorStoreFileBatchFilesOptionalParams,\n CancelVectorStoreFileBatchOptionalParams,\n GetVectorStoreFileBatchOptionalParams,\n CreateVectorStoreFileBatchOptionalParams,\n DeleteVectorStoreFileOptionalParams,\n GetVectorStoreFileOptionalParams,\n CreateVectorStoreFileOptionalParams,\n ListVectorStoreFilesOptionalParams,\n DeleteVectorStoreOptionalParams,\n ModifyVectorStoreOptionalParams,\n GetVectorStoreOptionalParams,\n CreateVectorStoreOptionalParams,\n ListVectorStoresOptionalParams,\n GetFileContentOptionalParams,\n GetFileOptionalParams,\n DeleteFileOptionalParams,\n UploadFileOptionalParams,\n ListFilesOptionalParams,\n ListRunStepsOptionalParams,\n GetRunStepOptionalParams,\n CreateThreadAndRunOptionalParams,\n CancelRunOptionalParams,\n SubmitToolOutputsToRunOptionalParams,\n UpdateRunOptionalParams,\n GetRunOptionalParams,\n ListRunsOptionalParams,\n CreateRunOptionalParams,\n UpdateMessageOptionalParams,\n GetMessageOptionalParams,\n ListMessagesOptionalParams,\n CreateMessageOptionalParams,\n ListThreadsOptionalParams,\n DeleteThreadOptionalParams,\n UpdateThreadOptionalParams,\n GetThreadOptionalParams,\n CreateThreadOptionalParams,\n DeleteAgentOptionalParams,\n UpdateAgentOptionalParams,\n GetAgentOptionalParams,\n ListAgentsOptionalParams,\n CreateAgentOptionalParams,\n} from \"./api/options.js\";\nimport {\n listVectorStoreFileBatchFiles,\n cancelVectorStoreFileBatch,\n getVectorStoreFileBatch,\n createVectorStoreFileBatch,\n deleteVectorStoreFile,\n getVectorStoreFile,\n createVectorStoreFile,\n listVectorStoreFiles,\n deleteVectorStore,\n modifyVectorStore,\n getVectorStore,\n createVectorStore,\n listVectorStores,\n getFileContent,\n getFile,\n deleteFile,\n uploadFile,\n listFiles,\n listRunSteps,\n getRunStep,\n createThreadAndRun,\n cancelRun,\n submitToolOutputsToRun,\n updateRun,\n getRun,\n listRuns,\n createRun,\n updateMessage,\n getMessage,\n listMessages,\n createMessage,\n listThreads,\n deleteThread,\n updateThread,\n getThread,\n createThread,\n deleteAgent,\n updateAgent,\n getAgent,\n listAgents,\n createAgent,\n uploadFileAndPoll,\n createVectorStoreFileAndPoll,\n createVectorStoreFileBatchAndPoll,\n createVectorStoreAndPoll,\n} from \"./api/operations.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { OperationState, PollerLike } from \"@azure/core-lro\";\nimport { AgentRunResponse } from \"./models/streamingModels.js\";\n\nexport { AgentsClientOptionalParams } from \"./api/agentsContext.js\";\n\nexport class AgentsClient {\n private _client: AgentsContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n endpointParam: string,\n credential: KeyCredential | TokenCredential,\n options: AgentsClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createAgents(endpointParam, credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n }\n\n /** Returns a list of vector store files in a batch. */\n listVectorStoreFileBatchFiles(\n vectorStoreId: string,\n batchId: string,\n options: ListVectorStoreFileBatchFilesOptionalParams = {\n requestOptions: {},\n },\n ): Promise<OpenAIPageableListOfVectorStoreFile> {\n return listVectorStoreFileBatchFiles(this._client, vectorStoreId, batchId, options);\n }\n\n /** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */\n cancelVectorStoreFileBatch(\n vectorStoreId: string,\n batchId: string,\n options: CancelVectorStoreFileBatchOptionalParams = { requestOptions: {} },\n ): Promise<VectorStoreFileBatch> {\n return cancelVectorStoreFileBatch(this._client, vectorStoreId, batchId, options);\n }\n\n /** Retrieve a vector store file batch. */\n getVectorStoreFileBatch(\n vectorStoreId: string,\n batchId: string,\n options: GetVectorStoreFileBatchOptionalParams = { requestOptions: {} },\n ): Promise<VectorStoreFileBatch> {\n return getVectorStoreFileBatch(this._client, vectorStoreId, batchId, options);\n }\n\n /** Create a vector store file batch. */\n createVectorStoreFileBatch(\n vectorStoreId: string,\n options: CreateVectorStoreFileBatchOptionalParams = { requestOptions: {} },\n ): Promise<VectorStoreFileBatch> {\n return createVectorStoreFileBatch(this._client, vectorStoreId, options);\n }\n\n /** Create a vector store file batch and poll. */\n createVectorStoreFileBatchAndPoll(\n vectorStoreId: string,\n options: CreateVectorStoreFileBatchOptionalParams = { requestOptions: {} },\n ): PollerLike<OperationState<VectorStoreFileBatch>, VectorStoreFileBatch> {\n return createVectorStoreFileBatchAndPoll(this._client, vectorStoreId, options);\n }\n\n /**\n * Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted.\n * To delete the file, use the delete file endpoint.\n */\n deleteVectorStoreFile(\n vectorStoreId: string,\n fileId: string,\n options: DeleteVectorStoreFileOptionalParams = { requestOptions: {} },\n ): Promise<VectorStoreFileDeletionStatus> {\n return deleteVectorStoreFile(this._client, vectorStoreId, fileId, options);\n }\n\n /** Retrieves a vector store file. */\n getVectorStoreFile(\n vectorStoreId: string,\n fileId: string,\n options: GetVectorStoreFileOptionalParams = { requestOptions: {} },\n ): Promise<VectorStoreFile> {\n return getVectorStoreFile(this._client, vectorStoreId, fileId, options);\n }\n\n /** Create a vector store file by attaching a file to a vector store. */\n createVectorStoreFile(\n vectorStoreId: string,\n options: CreateVectorStoreFileOptionalParams = { requestOptions: {} },\n ): Promise<VectorStoreFile> {\n return createVectorStoreFile(this._client, vectorStoreId, options);\n }\n\n /** Create a vector store file by attaching a file to a vector store and poll. */\n createVectorStoreFileAndPoll(\n vectorStoreId: string,\n options: CreateVectorStoreFileOptionalParams = { requestOptions: {} },\n ): PollerLike<OperationState<VectorStoreFile>, VectorStoreFile> {\n return createVectorStoreFileAndPoll(this._client, vectorStoreId, options);\n }\n\n /** Returns a list of vector store files. */\n listVectorStoreFiles(\n vectorStoreId: string,\n options: ListVectorStoreFilesOptionalParams = { requestOptions: {} },\n ): Promise<OpenAIPageableListOfVectorStoreFile> {\n return listVectorStoreFiles(this._client, vectorStoreId, options);\n }\n\n /** Deletes the vector store object matching the specified ID. */\n deleteVectorStore(\n vectorStoreId: string,\n options: DeleteVectorStoreOptionalParams = { requestOptions: {} },\n ): Promise<VectorStoreDeletionStatus> {\n return deleteVectorStore(this._client, vectorStoreId, options);\n }\n\n /** The ID of the vector store to modify. */\n modifyVectorStore(\n vectorStoreId: string,\n options: ModifyVectorStoreOptionalParams = { requestOptions: {} },\n ): Promise<VectorStore> {\n return modifyVectorStore(this._client, vectorStoreId, options);\n }\n\n /** Returns the vector store object matching the specified ID. */\n getVectorStore(\n vectorStoreId: string,\n options: GetVectorStoreOptionalParams = { requestOptions: {} },\n ): Promise<VectorStore> {\n return getVectorStore(this._client, vectorStoreId, options);\n }\n\n /** Creates a vector store. */\n createVectorStore(\n options: CreateVectorStoreOptionalParams = { requestOptions: {} },\n ): Promise<VectorStore> {\n return createVectorStore(this._client, options);\n }\n\n /**\n * Creates a vector store and poll.\n */\n createVectorStoreAndPoll(\n options: CreateVectorStoreOptionalParams = { requestOptions: {} },\n ): PollerLike<OperationState<VectorStore>, VectorStore> {\n return createVectorStoreAndPoll(this._client, options);\n }\n\n /** Returns a list of vector stores. */\n listVectorStores(\n options: ListVectorStoresOptionalParams = { requestOptions: {} },\n ): Promise<OpenAIPageableListOfVectorStore> {\n return listVectorStores(this._client, options);\n }\n\n /** Retrieves the raw content of a specific file. */\n getFileContent(\n fileId: string,\n options: GetFileContentOptionalParams = { requestOptions: {} },\n ): Promise<Uint8Array> {\n return getFileContent(this._client, fileId, options);\n }\n\n /** Returns information about a specific file. Does not retrieve file content. */\n getFile(\n fileId: string,\n options: GetFileOptionalParams = { requestOptions: {} },\n ): Promise<OpenAIFile> {\n return getFile(this._client, fileId, options);\n }\n\n /** Delete a previously uploaded file. */\n deleteFile(\n fileId: string,\n options: DeleteFileOptionalParams = { requestOptions: {} },\n ): Promise<FileDeletionStatus> {\n return deleteFile(this._client, fileId, options);\n }\n\n /** Uploads a file for use by other operations. */\n uploadFile(\n file: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options: UploadFileOptionalParams = { requestOptions: {} },\n ): Promise<OpenAIFile> {\n return uploadFile(\n this._client,\n { file: file, purpose: purpose, filename: options.fileName },\n options,\n );\n }\n\n /** Uploads a file for use by other operations and returns a poller to track the status of the operation. */\n uploadFileAndPoll(\n file: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options: UploadFileOptionalParams = { requestOptions: {} },\n ): PollerLike<OperationState<OpenAIFile>, OpenAIFile> {\n return uploadFileAndPoll(\n this._client,\n { file: file, purpose: purpose, filename: options.fileName },\n options,\n );\n }\n\n /** Gets a list of previously uploaded files. */\n listFiles(options: ListFilesOptionalParams = { requestOptions: {} }): Promise<FileListResponse> {\n return listFiles(this._client, options);\n }\n\n /** Gets a list of run steps from a thread run. */\n listRunSteps(\n threadId: string,\n runId: string,\n options: ListRunStepsOptionalParams = { requestOptions: {} },\n ): Promise<OpenAIPageableListOfRunStep> {\n return listRunSteps(this._client, threadId, runId, options);\n }\n\n /** Gets a single run step from a thread run. */\n getRunStep(\n threadId: string,\n runId: string,\n stepId: string,\n options: GetRunStepOptionalParams = { requestOptions: {} },\n ): Promise<RunStep> {\n return getRunStep(this._client, threadId, runId, stepId, options);\n }\n\n /** Creates a new agent thread and immediately starts a run using that new thread. */\n createThreadAndRun(\n assistantId: string,\n options: CreateThreadAndRunOptionalParams = { requestOptions: {} },\n ): AgentRunResponse {\n return createThreadAndRun(this._client, assistantId, options);\n }\n\n /** Cancels a run of an in progress thread. */\n cancelRun(\n threadId: string,\n runId: string,\n options: CancelRunOptionalParams = { requestOptions: {} },\n ): Promise<ThreadRun> {\n return cancelRun(this._client, threadId, runId, options);\n }\n\n /** Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. */\n submitToolOutputsToRun(\n threadId: string,\n runId: string,\n toolOutputs: ToolOutput[],\n options: SubmitToolOutputsToRunOptionalParams = { requestOptions: {} },\n ): Promise<ThreadRun> {\n return submitToolOutputsToRun(this._client, threadId, runId, toolOutputs, options);\n }\n\n /** Modifies an existing thread run. */\n updateRun(\n threadId: string,\n runId: string,\n options: UpdateRunOptionalParams = { requestOptions: {} },\n ): Promise<ThreadRun> {\n return updateRun(this._client, threadId, runId, options);\n }\n\n /** Gets an existing run from an existing thread. */\n getRun(\n threadId: string,\n runId: string,\n options: GetRunOptionalParams = { requestOptions: {} },\n ): Promise<ThreadRun> {\n return getRun(this._client, threadId, runId, options);\n }\n\n /** Gets a list of runs for a specified thread. */\n listRuns(\n threadId: string,\n options: ListRunsOptionalParams = { requestOptions: {} },\n ): Promise<OpenAIPageableListOfThreadRun> {\n return listRuns(this._client, threadId, options);\n }\n\n /** Creates a new run for an agent thread. */\n createRun(\n threadId: string,\n assistantId: string,\n options: CreateRunOptionalParams = { requestOptions: {} },\n ): AgentRunResponse {\n return createRun(this._client, threadId, assistantId, options);\n }\n\n /** Modifies an existing message on an existing thread. */\n updateMessage(\n threadId: string,\n messageId: string,\n options: UpdateMessageOptionalParams = { requestOptions: {} },\n ): Promise<ThreadMessage> {\n return updateMessage(this._client, threadId, messageId, options);\n }\n\n /** Gets an existing message from an existing thread. */\n getMessage(\n threadId: string,\n messageId: string,\n options: GetMessageOptionalParams = { requestOptions: {} },\n ): Promise<ThreadMessage> {\n return getMessage(this._client, threadId, messageId, options);\n }\n\n /** Gets a list of messages that exist on a thread. */\n listMessages(\n threadId: string,\n options: ListMessagesOptionalParams = { requestOptions: {} },\n ): Promise<OpenAIPageableListOfThreadMessage> {\n return listMessages(this._client, threadId, options);\n }\n\n /** Creates a new message on a specified thread. */\n createMessage(\n threadId: string,\n role: MessageRole,\n content: MessageInputContent,\n options: CreateMessageOptionalParams = { requestOptions: {} },\n ): Promise<ThreadMessage> {\n return createMessage(this._client, threadId, role, content, options);\n }\n\n /** Gets a list of threads that were previously created. */\n listThreads(\n options: ListThreadsOptionalParams = { requestOptions: {} },\n ): Promise<OpenAIPageableListOfAgentThread> {\n return listThreads(this._client, options);\n }\n\n /** Deletes an existing thread. */\n deleteThread(\n threadId: string,\n options: DeleteThreadOptionalParams = { requestOptions: {} },\n ): Promise<ThreadDeletionStatus> {\n return deleteThread(this._client, threadId, options);\n }\n\n /** Modifies an existing thread. */\n updateThread(\n threadId: string,\n options: UpdateThreadOptionalParams = { requestOptions: {} },\n ): Promise<AgentThread> {\n return updateThread(this._client, threadId, options);\n }\n\n /** Gets information about an existing thread. */\n getThread(\n threadId: string,\n options: GetThreadOptionalParams = { requestOptions: {} },\n ): Promise<AgentThread> {\n return getThread(this._client, threadId, options);\n }\n\n /** Creates a new thread. Threads contain messages and can be run by agents. */\n createThread(options: CreateThreadOptionalParams = { requestOptions: {} }): Promise<AgentThread> {\n return createThread(this._client, options);\n }\n\n /** Deletes an agent. */\n deleteAgent(\n assistantId: string,\n options: DeleteAgentOptionalParams = { requestOptions: {} },\n ): Promise<AgentDeletionStatus> {\n return deleteAgent(this._client, assistantId, options);\n }\n\n /** Modifies an existing agent. */\n updateAgent(\n assistantId: string,\n options: UpdateAgentOptionalParams = { requestOptions: {} },\n ): Promise<Agent> {\n return updateAgent(this._client, assistantId, options);\n }\n\n /** Retrieves an existing agent. */\n getAgent(\n assistantId: string,\n options: GetAgentOptionalParams = { requestOptions: {} },\n ): Promise<Agent> {\n return getAgent(this._client, assistantId, options);\n }\n\n /** Gets a list of agents that were previously created. */\n listAgents(\n options: ListAgentsOptionalParams = { requestOptions: {} },\n ): Promise<OpenAIPageableListOfAgent> {\n return listAgents(this._client, options);\n }\n\n /** Creates a new agent. */\n createAgent(\n model: string,\n options: CreateAgentOptionalParams = { requestOptions: {} },\n ): Promise<Agent> {\n return createAgent(this._client, model, options);\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Client, ClientOptions } from "@azure-rest/core-client";
|
|
2
|
+
import { KeyCredential, TokenCredential } from "@azure/core-auth";
|
|
3
|
+
export interface AgentsContext extends Client {
|
|
4
|
+
/** The API version to use for this operation. */
|
|
5
|
+
/** Known values of {@link KnownVersions} that the service accepts. */
|
|
6
|
+
apiVersion: string;
|
|
7
|
+
}
|
|
8
|
+
/** Optional parameters for the client. */
|
|
9
|
+
export interface AgentsClientOptionalParams extends ClientOptions {
|
|
10
|
+
/** The API version to use for this operation. */
|
|
11
|
+
/** Known values of {@link KnownVersions} that the service accepts. */
|
|
12
|
+
apiVersion?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function createAgents(endpointParam: string, credential: KeyCredential | TokenCredential, options?: AgentsClientOptionalParams): AgentsContext;
|
|
15
|
+
//# sourceMappingURL=agentsContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentsContext.d.ts","sourceRoot":"","sources":["../../../src/api/agentsContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAa,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAmB,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnF,MAAM,WAAW,aAAc,SAAQ,MAAM;IAC3C,iDAAiD;IACjD,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,0CAA0C;AAC1C,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC/D,iDAAiD;IACjD,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,YAAY,CAC1B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,aAAa,GAAG,eAAe,EAC3C,OAAO,GAAE,0BAA+B,GACvC,aAAa,CAyDf"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { __rest } from "tslib";
|
|
4
|
+
import { logger } from "../logger.js";
|
|
5
|
+
import { getClient } from "@azure-rest/core-client";
|
|
6
|
+
import { isKeyCredential } from "@azure/core-auth";
|
|
7
|
+
export function createAgents(endpointParam, credential, options = {}) {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9
|
+
// Remove custom code when 1dp is available
|
|
10
|
+
const parts = endpointParam.split(";");
|
|
11
|
+
let endpointUrl = endpointParam;
|
|
12
|
+
if (parts.length === 4) {
|
|
13
|
+
const endpoint = "https://" + parts[0];
|
|
14
|
+
const subscriptionId = parts[1];
|
|
15
|
+
const resourceGroupName = parts[2];
|
|
16
|
+
const projectName = parts[3];
|
|
17
|
+
endpointUrl =
|
|
18
|
+
(_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `${endpoint}/agents/v1.0/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/${projectName}`;
|
|
19
|
+
}
|
|
20
|
+
// end of custom code
|
|
21
|
+
const prefixFromOptions = (_c = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _c === void 0 ? void 0 : _c.userAgentPrefix;
|
|
22
|
+
const userAgentInfo = `azsdk-js-ai-agents/1.0.0-beta.1`;
|
|
23
|
+
const userAgentPrefix = prefixFromOptions
|
|
24
|
+
? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
|
|
25
|
+
: `azsdk-js-api ${userAgentInfo}`;
|
|
26
|
+
const _j = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info }, credentials: {
|
|
27
|
+
scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : ["https://management.azure.com/.default"],
|
|
28
|
+
} }), { apiVersion: _ } = _j, updatedOptions = __rest(_j, ["apiVersion"]);
|
|
29
|
+
const clientContext = getClient(endpointUrl, credential, updatedOptions);
|
|
30
|
+
if (isKeyCredential(credential)) {
|
|
31
|
+
clientContext.pipeline.addPolicy({
|
|
32
|
+
name: "customKeyCredentialPolicy",
|
|
33
|
+
sendRequest(request, next) {
|
|
34
|
+
request.headers.set("Authorization", "Bearer " + credential.key);
|
|
35
|
+
return next(request);
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" });
|
|
40
|
+
const apiVersion = (_h = options.apiVersion) !== null && _h !== void 0 ? _h : "2024-07-01-preview";
|
|
41
|
+
clientContext.pipeline.addPolicy({
|
|
42
|
+
name: "ClientApiVersionPolicy",
|
|
43
|
+
sendRequest: (req, next) => {
|
|
44
|
+
// Use the apiVersion defined in request url directly
|
|
45
|
+
// Append one if there is no apiVersion and we have one at client options
|
|
46
|
+
const url = new URL(req.url);
|
|
47
|
+
if (!url.searchParams.get("api-version")) {
|
|
48
|
+
req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
|
|
49
|
+
}
|
|
50
|
+
return next(req);
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
return Object.assign(Object.assign({}, clientContext), { apiVersion });
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=agentsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentsContext.js","sourceRoot":"","sources":["../../../src/api/agentsContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAiB,eAAe,EAAmB,MAAM,kBAAkB,CAAC;AAenF,MAAM,UAAU,YAAY,CAC1B,aAAqB,EACrB,UAA2C,EAC3C,UAAsC,EAAE;;IAExC,2CAA2C;IAC3C,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,WAAW,GAAG,aAAa,CAAC;IAChC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,QAAQ,GAAG,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,iBAAiB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACnC,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7B,WAAW;YACT,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAChB,OAAO,CAAC,OAAO,mCACf,GAAG,QAAQ,8BAA8B,cAAc,mBAAmB,iBAAiB,2DAA2D,WAAW,EAAE,CAAC;IACxK,CAAC;IACD,qBAAqB;IACrB,MAAM,iBAAiB,G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,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,gCAAK,aAAa,KAAE,UAAU,GAAmB,CAAC;AAC3D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport { Client, ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { KeyCredential, isKeyCredential, TokenCredential } from \"@azure/core-auth\";\n\nexport interface AgentsContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface AgentsClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\nexport function createAgents(\n endpointParam: string,\n credential: KeyCredential | TokenCredential,\n options: AgentsClientOptionalParams = {},\n): AgentsContext {\n // Remove custom code when 1dp is available\n const parts = endpointParam.split(\";\");\n let endpointUrl = endpointParam;\n if (parts.length === 4) {\n const endpoint = \"https://\" + parts[0];\n const subscriptionId = parts[1];\n const resourceGroupName = parts[2];\n const projectName = parts[3];\n endpointUrl =\n options.endpoint ??\n options.baseUrl ??\n `${endpoint}/agents/v1.0/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/${projectName}`;\n }\n // end of custom code\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-ai-agents/1.0.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://management.azure.com/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n\n if (isKeyCredential(credential)) {\n clientContext.pipeline.addPolicy({\n name: \"customKeyCredentialPolicy\",\n sendRequest(request, next) {\n request.headers.set(\"Authorization\", \"Bearer \" + credential.key);\n return next(request);\n },\n });\n }\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-07-01-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return { ...clientContext, apiVersion } as AgentsContext;\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createAgents, AgentsContext, AgentsClientOptionalParams } from "./agentsContext.js";
|
|
2
|
+
export { listVectorStoreFileBatchFiles, cancelVectorStoreFileBatch, getVectorStoreFileBatch, createVectorStoreFileBatch, deleteVectorStoreFile, getVectorStoreFile, createVectorStoreFile, listVectorStoreFiles, deleteVectorStore, modifyVectorStore, getVectorStore, createVectorStore, listVectorStores, getFileContent, getFile, deleteFile, uploadFile, uploadFileAndPoll, listFiles, listRunSteps, getRunStep, createThreadAndRun, cancelRun, submitToolOutputsToRun, updateRun, getRun, listRuns, createRun, updateMessage, getMessage, listMessages, createMessage, listThreads, deleteThread, updateThread, getThread, createThread, deleteAgent, updateAgent, getAgent, listAgents, createAgent, } from "./operations.js";
|
|
3
|
+
export { ListVectorStoreFileBatchFilesOptionalParams, CancelVectorStoreFileBatchOptionalParams, GetVectorStoreFileBatchOptionalParams, CreateVectorStoreFileBatchOptionalParams, DeleteVectorStoreFileOptionalParams, GetVectorStoreFileOptionalParams, CreateVectorStoreFileOptionalParams, ListVectorStoreFilesOptionalParams, DeleteVectorStoreOptionalParams, ModifyVectorStoreOptionalParams, GetVectorStoreOptionalParams, CreateVectorStoreOptionalParams, ListVectorStoresOptionalParams, GetFileContentOptionalParams, GetFileOptionalParams, DeleteFileOptionalParams, UploadFileOptionalParams, ListFilesOptionalParams, ListRunStepsOptionalParams, GetRunStepOptionalParams, CreateThreadAndRunOptionalParams, CancelRunOptionalParams, SubmitToolOutputsToRunOptionalParams, UpdateRunOptionalParams, GetRunOptionalParams, ListRunsOptionalParams, CreateRunOptionalParams, UpdateMessageOptionalParams, GetMessageOptionalParams, ListMessagesOptionalParams, CreateMessageOptionalParams, ListThreadsOptionalParams, DeleteThreadOptionalParams, UpdateThreadOptionalParams, GetThreadOptionalParams, CreateThreadOptionalParams, DeleteAgentOptionalParams, UpdateAgentOptionalParams, GetAgentOptionalParams, ListAgentsOptionalParams, CreateAgentOptionalParams, PollingOptionsParams, PollingOptions, } from "./options.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAEA,OA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B,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
export { createAgents } from "./agentsContext.js";
|
|
4
|
+
export { listVectorStoreFileBatchFiles, cancelVectorStoreFileBatch, getVectorStoreFileBatch, createVectorStoreFileBatch, deleteVectorStoreFile, getVectorStoreFile, createVectorStoreFile, listVectorStoreFiles, deleteVectorStore, modifyVectorStore, getVectorStore, createVectorStore, listVectorStores, getFileContent, getFile, deleteFile, uploadFile, uploadFileAndPoll, listFiles, listRunSteps, getRunStep, createThreadAndRun, cancelRun, submitToolOutputsToRun, updateRun, getRun, listRuns, createRun, updateMessage, getMessage, listMessages, createMessage, listThreads, deleteThread, updateThread, getThread, createThread, deleteAgent, updateAgent, getAgent, listAgents, createAgent, } from "./operations.js";
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,YAAY,EAA6C,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,sBAAsB,EACtB,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,aAAa,EACb,UAAU,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport { createAgents, AgentsContext, AgentsClientOptionalParams } from \"./agentsContext.js\";\nexport {\n listVectorStoreFileBatchFiles,\n cancelVectorStoreFileBatch,\n getVectorStoreFileBatch,\n createVectorStoreFileBatch,\n deleteVectorStoreFile,\n getVectorStoreFile,\n createVectorStoreFile,\n listVectorStoreFiles,\n deleteVectorStore,\n modifyVectorStore,\n getVectorStore,\n createVectorStore,\n listVectorStores,\n getFileContent,\n getFile,\n deleteFile,\n uploadFile,\n uploadFileAndPoll,\n listFiles,\n listRunSteps,\n getRunStep,\n createThreadAndRun,\n cancelRun,\n submitToolOutputsToRun,\n updateRun,\n getRun,\n listRuns,\n createRun,\n updateMessage,\n getMessage,\n listMessages,\n createMessage,\n listThreads,\n deleteThread,\n updateThread,\n getThread,\n createThread,\n deleteAgent,\n updateAgent,\n getAgent,\n listAgents,\n createAgent,\n} from \"./operations.js\";\nexport {\n ListVectorStoreFileBatchFilesOptionalParams,\n CancelVectorStoreFileBatchOptionalParams,\n GetVectorStoreFileBatchOptionalParams,\n CreateVectorStoreFileBatchOptionalParams,\n DeleteVectorStoreFileOptionalParams,\n GetVectorStoreFileOptionalParams,\n CreateVectorStoreFileOptionalParams,\n ListVectorStoreFilesOptionalParams,\n DeleteVectorStoreOptionalParams,\n ModifyVectorStoreOptionalParams,\n GetVectorStoreOptionalParams,\n CreateVectorStoreOptionalParams,\n ListVectorStoresOptionalParams,\n GetFileContentOptionalParams,\n GetFileOptionalParams,\n DeleteFileOptionalParams,\n UploadFileOptionalParams,\n ListFilesOptionalParams,\n ListRunStepsOptionalParams,\n GetRunStepOptionalParams,\n CreateThreadAndRunOptionalParams,\n CancelRunOptionalParams,\n SubmitToolOutputsToRunOptionalParams,\n UpdateRunOptionalParams,\n GetRunOptionalParams,\n ListRunsOptionalParams,\n CreateRunOptionalParams,\n UpdateMessageOptionalParams,\n GetMessageOptionalParams,\n ListMessagesOptionalParams,\n CreateMessageOptionalParams,\n ListThreadsOptionalParams,\n DeleteThreadOptionalParams,\n UpdateThreadOptionalParams,\n GetThreadOptionalParams,\n CreateThreadOptionalParams,\n DeleteAgentOptionalParams,\n UpdateAgentOptionalParams,\n GetAgentOptionalParams,\n ListAgentsOptionalParams,\n CreateAgentOptionalParams,\n PollingOptionsParams,\n PollingOptions,\n} from \"./options.js\";\n"]}
|