ShishirPatil / gorilla

Gorilla: Training and Evaluating LLMs for Function Calls (Tool Calls)
https://gorilla.cs.berkeley.edu/
Apache License 2.0
11.44k stars 993 forks source link

LangChain Integration of Gorilla OpenFunctions-v2 #528

Open jiayini1119 opened 3 months ago

jiayini1119 commented 3 months ago

Hi, is there integration of Gorilla OpenFunctions-v2 with LangChain? I only see the integration of the Gorilla models such as gorilla-7b-hf-v1, but not the Gorilla OpenFunctions models. It would be nice if those models can also be integrated into LangChain.

Thanks!

ShishirPatil commented 3 months ago

Hey @jiayini1119 thanks for your interest! Yeah, we have all the integrations here: https://github.com/ShishirPatil/gorilla/discussions/74#discussioncomment-6564956

For your quick reference, the langchain example for a Gorilla model is here. You can use something similar for langchain as well: https://colab.research.google.com/drive/11HJWR3ylG1HSE2v78W1gRK-dKkSA0pHe?usp=sharing

Let us know if you have any further questions!!

jiayini1119 commented 3 months ago

Thank you @ShishirPatil !

jiayini1119 commented 3 months ago

Hi @ShishirPatil , is there any recent plan of migrating support of Gorilla openfunction to the latest openai version? It would be really nice if we can use something like bind_tools for Gorilla openfunction as well.

ShishirPatil commented 3 months ago

Thanks for the feedback @jiayini1119. Hmm. It takes quite some effort since we also implemented custom functions while the latest one uses tools. And this also has is a dependencies for gorilla-cli as well. Let me see if I get a weekend. I can sit and upgrade everything!

jiayini1119 commented 3 months ago

Thank you @ShishirPatil !