lifan0127 / ai-research-assistant

Aria is Your AI Research Assistant Powered by GPT Large Language Models
GNU Affero General Public License v3.0
1.06k stars 57 forks source link

!O: change name for compatibility #112

Closed caomingpei closed 3 months ago

caomingpei commented 3 months ago

To solve: Issue https://github.com/lifan0127/ai-research-assistant/issues/111

Implementation: Just change the name realted to function call name in search.ts from "search" to "search_" to be compatible with Qwen.

Reason: qwen reserve the "search" word for other usage, which don't allow user to use a 'search' as the function call name. To be compatible with the qwen openai format, this commit change the name.

Note:

https://github.com/lifan0127/ai-research-assistant/blob/c8d49763743f462a0cfb175832faa00f90692c22/src/models/chains/search.ts#L84

https://github.com/lifan0127/ai-research-assistant/blob/c8d49763743f462a0cfb175832faa00f90692c22//src/models/chains/search.ts#L215 The name changed.

lifan0127 commented 3 months ago

Hi @caomingpei Thanks for making the contribution! I suspect that we only need to rename at the following locations. Could you please check if it works?

https://github.com/lifan0127/ai-research-assistant/blob/main/src/models/chains/search.ts#L84

https://github.com/lifan0127/ai-research-assistant/blob/main/src/models/chains/search.ts#L215

caomingpei commented 3 months ago

Hi @caomingpei Thanks for making the contribution! I suspect that we only need to rename at the following locations. Could you please check if it works?

https://github.com/lifan0127/ai-research-assistant/blob/main/src/models/chains/search.ts#L84

https://github.com/lifan0127/ai-research-assistant/blob/main/src/models/chains/search.ts#L215

Yeah, you are right. Modifying these two places achieves compatibility. I have updated the code in the PR, and it worked. Thank you!

lifan0127 commented 3 months ago

Thanks!

caomingpei commented 3 months ago

Updated