Files
Vision/VisionAsist.SDK/IModule.cs
Egor ae0994409a
Some checks failed
Mirror to Gitea / git-sync (push) Has been cancelled
Yess
2026-03-28 00:26:55 +02:00

30 lines
1.1 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.Collections.Generic;
namespace VisionAsist.SDK;
public interface IModule
{
string Name { get; }
string Description { get; }
void Settings(object[] args);
// Возвращает список инструментов.
// Каждый инструмент описывает себя через JSON Schema.
List<ToolDefinition> GetTools();
// Выполняет инструмент.
// argumentsJson — это JSON объект с параметрами, который сгенерирeовал ИИ.
string Execute(string toolName, string argumentsJson);
}
public class ToolDefinition
{
// Имя функции (например, "get_weather")
public string Name { get; set; } = string.Empty;
// Описание для ИИ (что делает эта функция)
public string Description { get; set; } = string.Empty;
// Схема параметров в формате JSON Schema.
// Именно это поле мы будем скармливать нейросети.
public string ParametersSchema { get; set; } = "{\"type\": \"object\", \"properties\": {}}";
}