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

Function calling #119

Open
jcastdev opened this issue Feb 14, 2024 · 4 comments
Open

Function calling #119

jcastdev opened this issue Feb 14, 2024 · 4 comments

Comments

@jcastdev
Copy link

Sorry, im cannot understand where are functions that model decide to call . for example get_weather()...? In open ai code I wrote my own functions that model decide to call.. here where are those functions?
thanks..

@khai-meetkai
Copy link
Collaborator

Hi @jcastdev, functions to call are defined by you. You will provide a list of functions and a query, the model will decide if need to call a function from the list or respond directly. Functionary models are alternatives to OpenAI function calling models, you will also implement your own functions, and Functionary will decide when to use it.

@b8kings0ga
Copy link

how to proved function list to the model, are there any examples?

@khai-meetkai
Copy link
Collaborator

@b8kings0ga
You can provide the list of functions through the format of tool, as in the example: https://github.com/MeetKai/functionary?tab=readme-ov-file#openai-compatible-usage
Actually, if you are using OpenAI function calling model, you just need to replace:
client = OpenAI(api_key="xxx")
with
client = OpenAI(base_url="http://localhost:8000/v1", api_key="xxx")
Other parts are the same, no need to change anything

@b8kings0ga
Copy link

b8kings0ga commented Feb 22, 2024 via email

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

3 participants