-
Notifications
You must be signed in to change notification settings - Fork 116
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
setup llama_cpp for direct inference (support MacOS) #93
Conversation
Thank you for the PR! It looks good to me, maybe we can move this example to an examples topfolder. |
Also, I think there was a small problem with pydantic v2. I cannot remember exactly. @khai-meetkai mentioned earlier on. |
I'm happy to make this into a server as well since you've got all the definitions here. Relatedly, do you plan to release the functionary Python code as a PyPI package so that it can be used directly without cloning the repository? Have you all considered adding this model to Ollama? I'd love to get it in more people's hands. |
In order to add this example to an |
Verifying this works with the v2.2 model now. |
This is awesome @rgbkrk! Unblocks a lot of macOS users. An addition to Ollama would be amazing! |
Following this example I was able to demonstrate how to use langchain tools with functionary https://gist.github.com/shreyaskarnik/2cc099528f14671b096570498330ae54 there may be a better way to handle the actual function execution and I am open to learning the right way to do so. |
f620871
to
736dcd5
Compare
This sets up functionary on
llama_cpp
in a reusable way, at least for MacOS.7b-v2.2
gets downloaded from HuggingFace and cached for repeated runsmessages
andtools
in the OpenAI formatFunctionRegistry
from ChatLab can accept any functions with valid docstrings and types to make function declaration simpleA few liberties on my local setup:
requirements.txt
termcolor
is required for this example script as well aschatlab
1.3.0. These could be added into requirements.txt.