SuperSeller3000/src/Infrastructure/AI/OllamaClientInterface.php
Simon Kuehn a38fe7e72d fix: use web search in SpecsResearchAgent to prevent spec hallucination
The agent was calling generate() — pure model memory — which caused Mistral
to hallucinate specs for older devices (e.g. i5-1135G7 instead of i3-3120M).
generateWithWebSearch() is now used so Mistral queries live sources.

OllamaClientInterface gains generateWithWebSearch(); OllamaClient falls back
to generate() since Ollama has no built-in search tool.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 07:28:21 +00:00

15 lines
444 B
PHP

<?php
declare(strict_types=1);
namespace App\Infrastructure\AI;
interface OllamaClientInterface
{
public function generate(string $model, string $prompt): string;
public function generateWithImage(string $model, string $prompt, string $imagePath): string;
/** Generates with web search if the backend supports it, falls back to generate(). */
public function generateWithWebSearch(string $model, string $prompt): string;
}