<?php
namespace EasyChat\Library\AiProvider;

interface AiProvider {
	function getCurlOptions($prompt, $options);
	function query($prompt, $options);
	function stream($prompt, $options);
	function streamChat($prompt, array $options = [], ?callable $on_delta = null);
	function parallel();
	function getToken();
	function getEmbedding($text, $model, $dimension, array $options = []);
	function getEmbeddings(array $texts, $model, $dimension, array $options = []);
	function supportsKnowledgeGrounding();
	function supportsGroundingSources();
	function getLastGrounding();
	function getLastProviderError();
	function getHistory();
	function setHistory($messages);
	function clearHistory();

	




	function setTools(array $toolsConfig);

	






	function parseToolCalls($response);

	





	function appendAssistantToolCalls($response);

	







	function appendToolResult($call_id, $name, $result);

	











	function runWithTools($prompt, $executor, array $options = [], $max_iterations = 5);
	function runWithToolsStream($prompt, $executor, array $options = [], ?callable $on_delta = null, $max_iterations = 5);
}
