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

Using local adapter via OpenAI API #199

Closed
prd-tuong-nguyen opened this issue Jan 22, 2024 · 4 comments · Fixed by #223
Closed

Using local adapter via OpenAI API #199

prd-tuong-nguyen opened this issue Jan 22, 2024 · 4 comments · Fixed by #223
Assignees
Labels
enhancement New feature or request

Comments

@prd-tuong-nguyen
Copy link

Feature request

When using the original endpoint, I can pass the adapter_source as "local" to load adapter from local directory.
How can I do it with OpenAI endpoint?
I have try pass --adapter-source local when run docker but it's still not working

Motivation

Load local adapter

Your contribution

.

@tgaddair
Copy link
Contributor

Hey @prd-tuong-nguyen, I'd be happy to add support for this. There are two ways I could think to do it:

  1. Allow the user to set the default adapter source during initialization, as you were trying to do.
  2. Allow the user to provide the adapter source as a request parameter to the OpenAI client using the extra_body param here: https://github.com/openai/openai-python/blob/main/src/openai/resources/chat/completions.py#L645

Both could work. I think being able to set a default adapter source is a good idea in general, though. So happy to take that on first.

@tgaddair tgaddair added the enhancement New feature or request label Jan 22, 2024
@prd-tuong-nguyen
Copy link
Author

@tgaddair thank u for your quick reply,
I agree with you that setting the default adapter source is the good way to start.
I'm here to waiting that amazing feature <3

@tgaddair
Copy link
Contributor

tgaddair commented Feb 5, 2024

Hey @prd-tuong-nguyen, we just landed #223 which should hopefully address this issue. Let us know if there are any issues!

@prd-tuong-nguyen
Copy link
Author

@tgaddair amazing, thank u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants