[OpenAI] [Assistants] Add fileIds to Thread messages (#29500)

Fix #29473 

### Packages impacted by this PR
@azure/openai-assistants

### Issues associated with this PR
#29473 

### Describe the problem that is addressed by this PR
Add fileIds to Thread messages

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
This commit is contained in:
Glenn Harper 2024-04-29 19:50:52 -04:00 коммит произвёл GitHub
Родитель 9e3fe170a4
Коммит a81dcbe626
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 14 добавлений и 16 удалений

Просмотреть файл

@ -54,10 +54,7 @@ export interface AssistantThread {
// @public
export interface AssistantThreadCreationOptions {
messages?: {
role: string;
content: string;
}[];
messages?: ThreadInitializationMessage[];
metadata?: Record<string, string>;
}
@ -502,7 +499,7 @@ export interface ThreadDeletionStatus extends DeletionStatus {
export interface ThreadInitializationMessage {
content: string;
fileIds?: string[];
metadata: Record<string, string> | null;
metadata?: Record<string, string> | null;
role: MessageRole;
}

Просмотреть файл

@ -103,10 +103,7 @@ export interface AssistantThread {
// @public
export interface AssistantThreadCreationOptions {
messages?: {
role: string;
content: string;
}[];
messages?: ThreadInitializationMessage[];
metadata?: Record<string, string>;
}
@ -551,6 +548,14 @@ export interface SubmitToolOutputsToRunOptions extends OperationOptions {
export interface ThreadDeletionStatus extends DeletionStatus {
}
// @public
export interface ThreadInitializationMessage {
content: string;
fileIds?: string[];
metadata?: Record<string, string> | null;
role: MessageRole;
}
// @public
export interface ThreadMessage {
assistantId?: string;

Просмотреть файл

@ -96,6 +96,7 @@ export {
GetMessageFileOptions,
GetMessageOptions,
ThreadRun,
ThreadInitializationMessage,
CancelRunOptions,
CreateRunOptions,
CreateRunRequestOptions,

Просмотреть файл

@ -123,12 +123,7 @@ export interface AssistantFileDeletionStatus extends DeletionStatus {}
/** The details used to create a new assistant thread. */
export interface AssistantThreadCreationOptions {
/** The messages to associate with the new thread. */
messages?: {
/** The role associated with the assistant thread message. */
role: string;
/** The list of content items associated with the assistant thread message. */
content: string;
}[];
messages?: ThreadInitializationMessage[];
/** A set of key/value pairs used to store additional information about the object. */
metadata?: Record<string, string>;
}
@ -145,7 +140,7 @@ export interface ThreadInitializationMessage {
*/
fileIds?: string[];
/** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */
metadata: Record<string, string> | null;
metadata?: Record<string, string> | null;
}
/** Information about a single thread associated with an assistant. */