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 opensource models like LLama #47

Open
pradeepdev-1995 opened this issue Jul 13, 2023 · 6 comments
Open

Support for opensource models like LLama #47

pradeepdev-1995 opened this issue Jul 13, 2023 · 6 comments

Comments

@pradeepdev-1995
Copy link

pradeepdev-1995 commented Jul 13, 2023

Is it possible to configure opensource models like dolly,llama,,etc instead of openai models in simpleaichat and do prompting also.

@Vokturz
Copy link
Contributor

Vokturz commented Jul 16, 2023

I've created a PR # 52 which allows to use a custom API URL endpoint. For llama models, you can start the llama.cpp python web-server and then change the api_url of AIChat:

ai = AIChat(api_key='None', api_url='http://localhost:8000/v1/chat/completions', console=False)

@minimaxir
Copy link
Owner

minimaxir commented Jul 18, 2023

I merged #52 since that is a fair fix for a bug, but I am uncertain on how high of a priority to develop for open source models like llama.ccp is, particularly since they may have different APIs that are unique and don't play nice with each other.

It is definitely within scope and on the roadmap, though.

@araichev
Copy link

Does this PR work with (local) GPT4All models too?

@Vokturz
Copy link
Contributor

Vokturz commented Jul 27, 2023

Does this PR work with (local) GPT4All models too?

I don't think so, GPT4All API server does not have an implementation for the chat/completions URL.

@Xoeseko
Copy link

Xoeseko commented Jul 28, 2023

Does this PR work with (local) GPT4All models too?

I don't think so, GPT4All API server does not have an implementation for the chat/completions URL.

Actually, in the link you sent, L49 gives the completions endpoint which seems to be compatible. All routes refering to that router are subroutes of the chat route.

I also got the chance to test and it seems that the GPT4All API server is compatible.
However, I needed to find a way to create a session without passing an api key which led to this PR #62.
@Vokturz Were you able to use other models without this implementation ?

@Vokturz
Copy link
Contributor

Vokturz commented Aug 7, 2023

@Xoeseko but if you take a closer look at chat_completion function, you will notice it is currently just a structural placeholderwith no actual implementation.
I've tried following the instructions from GPT4ALL-API README with no success.

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

No branches or pull requests

5 participants