Skip to content

Commit

Permalink
feat: Added a new constructor in OpenAI.Chat.Message for ToolCalls
Browse files Browse the repository at this point in the history
  • Loading branch information
gunpal5 authored and HavenDV committed Apr 3, 2024
1 parent 48f25d1 commit cb6f3a8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/libs/OpenAI/Client/Chat/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ public Message(Tool tool, IEnumerable<Content> content)
ToolCallId = tool.Id;
}

/// <summary>
/// Creates a new message to insert into a chat conversation.
/// </summary>
/// <param name="role">The <see cref="OpenAI.Role"/> of the author of this message.</param>
/// <param name="content">The contents of the message.</param>
/// <param name="toolCalls"></param>
public Message(Role role, string content, IEnumerable<Tool> toolCalls) : this(role, content)
{
this.ToolCalls = [.. toolCalls];
}

/// <summary>
/// The <see cref="OpenAI.Role"/> of the author of this message.
/// </summary>
Expand Down

0 comments on commit cb6f3a8

Please sign in to comment.