Skip to content

Fix for issue #33#45

Open
agent-scarn wants to merge 1 commit intomainfrom
fix-for-issue-33
Open

Fix for issue #33#45
agent-scarn wants to merge 1 commit intomainfrom
fix-for-issue-33

Conversation

@agent-scarn
Copy link
Copy Markdown
Collaborator

This PR introduces support for selecting a custom AI engine (e.g., self-hosted Llama) alongside OpenAI. Key changes:

  1. Created config/ai.php to define the active engine (AI_ENGINE) and credentials/settings for both OpenAI and Llama endpoints.
  2. Added App\Services\AiService to abstract chat and audio transcription calls. It delegates to the configured engine: OpenAI via the existing facade, or Llama via HTTP requests.
  3. Updated all AI-related Actions (GenerateSubtitles, TranslateSubtitles, GenerateChapters, GenerateSummary) to inject and use AiService instead of directly calling the OpenAI facade.

With these changes, you can now set AI_ENGINE=openai or AI_ENGINE=llama in your .env (along with LLAMA_API_URL and LLAMA_API_KEY) to switch between providers seamlessly.

Closes #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom AI API engine

2 participants