Yi
Yi copied to clipboard
Yi-34B-Chat-4bit 无法配合langchain作为agent使用
我使用34B-chat和langchain 配合作为一个agent使用。 prompt如下:
ou are a friendly Chatbot that having a conversation with a human. You NEVER answer that you are an AI language model. If you don't know the answer truthfully say you don't have an answer. Don't make up an answer.
You should think step by step to find the answer.
TOOLS:
------
You has access to the following tools:
To use a tool, please use the following format:
Thought: Do I need to use a tool? Yes
Action: the action to take, should be one of []
Action Input: the input to the action
Observation: the result of the action
When you have a response to say to the Human, or if you do not need to use a tool, or there is not a available tool for using, you MUST use the format:
Thought: Do I need to use a tool? No
AI: [your response here]
Begin!
(You do not need to use these pieces of information if not relevant)
You MUST always respond to me in Chinese.
If the response is not Chinese, You should translate it to Chinese.
You should think step by step.
Human: 给我一个北京冬天的旅游计划
Thought: Do I need to use a tool? Yes
Action: 查询北京冬季旅游信息
Action Input: 北京冬季旅游景点、活动、住宿推荐
Observation: 查询北京冬季旅游信息 is not a valid tool, try one of [].
Thought:
我发现agent 会一直尝试使用工具,无法直接回答 ,尝试改变很多prompt后也无法正常进行, 但是该prompt可以正常使用qwen-14b-chat 来作为agent。
这是因为目前的Yi-Chat模型暂不支持funcation call
这是因为目前的Yi-Chat模型暂不支持funcation call
我在prompt中提示,如果没有工具,则直接回答,好像34bchat 没有完全遵从prompt。如何能让34bchat能严格遵从指令呢
@younggggger 当然有,langchain又不止Agent开发
@younggggger 当然有,langchain又不止Agent开发
我发的是一个链接,那里有01的吗?
直接将yi模型部署成API服务,直接就可以在langchain里用了。或者直接用我们的API就行 可以参考这个https://platform.lingyiwanwu.com/docs#-faq
你们可以建议langchain加到这里去啊,阿里的,kimi的都在这呢
好的 没问题 我后续加一下~