fix: handle text parts with tool_call_ids and empty text

This commit is contained in:
Danny Avila 2024-09-03 23:15:29 -04:00
parent 0c04018bb3
commit 350d709763
No known key found for this signature in database
GPG key ID: 2DD9CC89B9B50364
4 changed files with 17 additions and 5 deletions

View file

@ -10,6 +10,7 @@ export namespace Agents {
export type MessageContentText = {
type: ContentTypes.TEXT;
text: string;
tool_call_ids?: string[];
};
export type MessageContentImageUrl = {

View file

@ -381,7 +381,7 @@ export type ContentPart = (
export type TMessageContentParts =
| { type: ContentTypes.ERROR; text: Text & PartMetadata }
| { type: ContentTypes.TEXT; text: string | (Text & PartMetadata) }
| { type: ContentTypes.TEXT; text: string; tool_call_ids?: string[] | (Text & PartMetadata) }
| {
type: ContentTypes.TOOL_CALL;
tool_call: (