Skip to content

feat: bring your own llm #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Nov 28, 2024
Merged

feat: bring your own llm #138

merged 26 commits into from
Nov 28, 2024

Conversation

jgoux
Copy link
Contributor

@jgoux jgoux commented Nov 21, 2024

This PR adds the ability to connect an external Ollama or OpenAI compatible model.

We use a service worker to proxy the Chat's requests to the provided external API.

Demo:

byo-llm.mp4

Remaining tasks:

  • Investigate the finishReason: error we are getting from the service worker
  • Integrate the service worker bundling into the build pipeline (prebuild)
  • Use the specific Ollama adapter when Ollama is detected through the baseUrl Removed since we no longer recommend local models (as of today). Also Ollama just released streaming tool calls, so the OpenAI adapter should suffice.
  • Add the ability to disable the usage of the external model provider without deleting its data
  • Remove the need for login when using the external model provider
  • Bonus: Add the ability for the user to provide their own system prompt
  • Show the "set external model" sidebar button as "disabled" if the model provider is disabled
  • Test with various models which support tool calling (hosted through together.ai or openrouter, local through Ollama)

Copy link

vercel bot commented Nov 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
database-build ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 11:22pm

@jgoux jgoux changed the base branch from feat/deploy-with-supabase to main November 26, 2024 14:51
@gregnr gregnr marked this pull request as ready for review November 28, 2024 20:55
@gregnr gregnr merged commit 06b4210 into main Nov 28, 2024
2 checks passed
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.

2 participants