Git Product home page Git Product logo

Comments (4)

JianxinMa avatar JianxinMa commented on June 12, 2024 3

有,这里是添加工具的模版 tools.py,对应工具也可以实现在这个目录下,然后将你的tool入口加到call_plugin函数,之后就可以调用了

@tuhahaha 我们需要先把代码架构稳定下来,然后写个step-by-step的文档说明下如何加新工具。

from qwen-agent.

tuhahaha avatar tuhahaha commented on June 12, 2024

有,这里是添加工具的模版https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/agents/tools/tools.py,对应工具也可以实现在这个目录下,然后将你的tool入口加到call_plugin函数,之后就可以调用了

from qwen-agent.

gcxamy avatar gcxamy commented on June 12, 2024

您好,我看您说那个开源数据集的写法在https://github.com/QwenLM/Qwen/blob/main/examples/function_call_finetune_examples.py请问是用这个文件生成对应的调用工具开源数据集,然后用您说的在tool里加入自己的类的call调用,再训练就可以了吗?有对应的每个步骤吗?

from qwen-agent.

JianxinMa avatar JianxinMa commented on June 12, 2024

您好,我看您说那个开源数据集的写法在https://github.com/QwenLM/Qwen/blob/main/examples/function_call_finetune_examples.py请问是用这个文件生成对应的调用工具开源数据集,然后用您说的在tool里加入自己的类的call调用,再训练就可以了吗?有对应的每个步骤吗?

您贴的这个链接是和“微调”相关的。但是只是想让模型使用自定义新工具的话,通常不需要微调,只需要提供下工具的描述和输入参数描述(描述是否清楚非常重要,这个描述会作为输入给模型的prompt的一部分,相当于是在做prompt engineering)。如果你在使用qwen-max,可以参考本repo的readme添加自定义工具(后续开源的新模型版本也将支持);如果是在使用之前开源的模型,可以参考Qwen主仓库的 openai_api.py 或 examples 下的 function_call_examples.py

from qwen-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.