Files
ChatBot/ChatBot/Models/Dto/ToolCall.cs
2025-10-15 18:25:26 +03:00

51 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace ChatBot.Models.Dto
{
/// <summary>
/// Вызов инструмента, сгенерированный моделью.
/// </summary>
[DataContract]
public class ToolCall
{
/// <summary>
/// Идентификатор вызова инструмента.
/// </summary>
[DataMember(Name = "id")]
public required string Id { get; set; }
/// <summary>
/// Тип инструмента. В настоящее время поддерживается только функция.
/// </summary>
[DataMember(Name = "type")]
public required string Type { get; set; }
/// <summary>
/// Функция, которую вызвала модель.
/// </summary>
[DataMember(Name = "function")]
public required FunctionCall Function { get; set; }
}
/// <summary>
/// Функция, которую вызвала модель.
/// </summary>
[DataContract]
public class FunctionCall
{
/// <summary>
/// Имя функции для вызова.
/// </summary>
[DataMember(Name = "name")]
public required string Name { get; set; }
/// <summary>
/// Аргументы для вызова функции, сгенерированные моделью в формате JSON.
/// </summary>
[DataMember(Name = "arguments")]
public required string Arguments { get; set; }
}
}