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

[model client enchancement] Support internally hosted models that can be accessed via requests #254

Open
liyin2015 opened this issue Oct 31, 2024 · 2 comments
Labels
[adalflow] suggest core feature New core features in the base classes and optimization help wanted Need helps with input, discussion, review, and PR submission. P1 2nd priority

Comments

@liyin2015
Copy link
Member

Is your feature request related to a problem? Please describe.

User case:

In our corporate environment, we use an internally hosted version of the ChatGPT-Omni model due to security restrictions, and we access it via a custom API. We send requests using requests.post with the headers containing an authorization token, and the prompt is passed as params['messages'] in the format {'role': 'system', 'content': sys_prompt}, {'role': 'user', 'content': user_prompt}.

Describe the solution you'd like

There are possibly two solutions: (1) one request based model client (2) as LiteLLM is request native, they are most likely already support this case.

We need to choose the solution with the least amount of work.

Process

We will need contributor to make a short proposal at this issue. And then follow the guideline to add model_client in the contributor guide.

@liyin2015 liyin2015 added [adalflow] suggest core feature New core features in the base classes and optimization help wanted labels Oct 31, 2024
@jimixxperez
Copy link

@liyin2015 Having the same issue with a client currently. Custom authentication process for an internally hosted AzureOpenAI endpoint.

I think creating a bridge via the CustomLLM interface of litellm is the just the right amount of abstraction above a low level http client like request or httpx (async), etc. You can easily share it and implement the requirements you have.
You can then simply use this abstraction or you can even inject your custom interface into the litellm proxy that supported tons for configurations.

@liyin2015 liyin2015 added the help wanted Need helps with input, discussion, review, and PR submission. label Nov 21, 2024
@liyin2015
Copy link
Member Author

@jimixxperez interesting, can you read the discussion in #269

So basically we want our developers to use provider's sdk (prefer) but tell them to use litellm integration for internally hosted AzureOpenAI endpoint? Will litellm help us extend to GCP or other cloud hosted end point?

It would be great if you can also provide some code examples

@liyin2015 liyin2015 added the P1 2nd priority label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[adalflow] suggest core feature New core features in the base classes and optimization help wanted Need helps with input, discussion, review, and PR submission. P1 2nd priority
Projects
None yet
Development

No branches or pull requests

2 participants