We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
首先要函数式调用,使用ChatErnieRequest类
public class ChatErnieRequest extends ChatBaseRequest { private static final Logger log = LoggerFactory.getLogger(ChatErnieRequest.class); private Float temperature; private Float topP; private Float penaltyScore; private List<FunctionInfo> functions; ...... }
FunctionInfo结构如下:
public class FunctionInfo { private String name; private String description; private FunctionParameters parameters; private FunctionResponses responses; private List<Example> examples; } 官网的结构如下: { "messages":[ { "role":"user", "content":"上海市今天的天气" } ], "functions":[ { "name":"get_current_weather", "description":"获得指定地点的天气", "parameters":{ "type":"object", "properties":Object{...}, "required":["location"] } }, Object{...} ], "stream":true, "tool_choice":Object{...} }
对应到parameters字段的FunctionParameters类,结构是:
public class FunctionParameters { private String name; private String description; private Map<String, Map<String, String>> properties; }
官网上的parameters参数中有一个type字段,值是object,首先是type字段,应该是默认给了object,那required字段怎么填写呢? 请问是遗漏了还是有其他的调用方式?谢谢
另外能否在示例中写一下函数式调用的demo,多谢大佬。
The text was updated successfully, but these errors were encountered:
这个地方的确有遗漏了字段,此外,这一部分官方文档后续也有一些更新。并且function call这一部分设计上的确存在一些不合理的地方,这一块会在下个版本进行更改。
Sorry, something went wrong.
No branches or pull requests
首先要函数式调用,使用ChatErnieRequest类
FunctionInfo结构如下:
对应到parameters字段的FunctionParameters类,结构是:
官网上的parameters参数中有一个type字段,值是object,首先是type字段,应该是默认给了object,那required字段怎么填写呢?
请问是遗漏了还是有其他的调用方式?谢谢
另外能否在示例中写一下函数式调用的demo,多谢大佬。
The text was updated successfully, but these errors were encountered: