Skip to content
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

Support for custom endpoints #84

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leftmove
Copy link
Contributor

@leftmove leftmove commented Nov 22, 2024

What:

Support for custom endpoints.

Why:

Right now you can create custom API models, but it would be useful to have support for custom endpoints that use familiar API structures.

Examples include: Azure OpenAI, Vertex Studio, Ollama. There are all services that can create endpoints compatible with the OpenAI or Gemini API clients (or REST in this case). They are drop-in replacements that work simply by changing the endpoint URL, so implementing them through the customCopilot option would be needlessly hard.

How:

I changed up the createProviderEndpoint method to support custom endpoints, and allowed for the user to input a custom endpoint in the Copilot class.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

Probably not ready to merge. It may need tests, but I am unfamiliar with Vitest (I use Mocha).

I am happy to add documentation and fix bugs if needed though.

Thanks!

@arshad-yaseen
Copy link
Owner

Thank you! Will review and merge.

@arshad-yaseen arshad-yaseen marked this pull request as draft November 22, 2024 16:29
@leftmove
Copy link
Contributor Author

Thanks!

Hope I am not being a burden - let me know if you need anything.

@arshad-yaseen
Copy link
Owner

The conflicts, I think you not pulled latest changes before working on it 😆 Also could you please add the documentation about it in README.md?

@arshad-yaseen
Copy link
Owner

Also would be nice if you fix the conflicts xD Then i'll add tests and will make this ready to merge.

@arshad-yaseen arshad-yaseen marked this pull request as ready for review November 30, 2024 05:07
@arshad-yaseen arshad-yaseen marked this pull request as draft December 7, 2024 19:28
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