函数query
功能描述
调用此接口进行知识图谱知识问答。
函数原型
def query(text, llm_config, *args, **kwargs)
输入参数说明
参数名 |
数据类型 |
可选/必选 |
说明 |
---|---|---|---|
text |
str |
必选 |
原始问题,取值范围为(0, 1000*1000] |
llm_config |
LLMParameterConfig |
可选 |
调用大模型参数,此处默认值temperature为“0.5”,top_p为“0.95”,其余参数说明请参见LLMParameterConfig类。 |
args |
列表 |
可选 |
继承父类方法签名,此处未使用。 |
kwargs |
字典 |
可选 |
继承父类方法签名,此处未使用。 |
返回值说明
数据类型 |
说明 |
---|---|
dict |
返回大模型回答,格式{'query': "who is Teutberga's parents?", 'result': "Teutberga's parents are Bosonid Boso the Elder and an unknown mother."} |