调用大模型
命令说明
调用大模型回答问题或对自然语言进行处理
命令原型
LLM.GeneralChat({},"","","",30,0.7,4000)
命令参数
| 参数 | 必选 | 类型 | 默认值 | 说明 |
|---|---|---|---|---|
| model | True | string | "" | 模型名称 |
| base_url | True | string | "" | 模型访问地址 |
| api_key | True | string | "" | API秘钥 |
| content | true | string | "" | 用户提示词 |
| prompt | false | string | "" | 系统提示词 |
| file_path | false | string | "" | 图片路径 (JPEG/PNG/BMP,最大10MB,部分模型不一定三种格式图片都支持) |
| timeout | false | int | 30s | 超时时间(秒) |
| temperature | false | int | 0.7 | 温度 |
| max_output_length | false | int | 4000 | 最大输出长度(token) |
运行实例
/***************************输入文本**********************************
命令原型:
LLM.GeneralChat({},"","","",30,0.7,4000)
入参:
model -- 模型名称
base_url-- 模型访问地址
api_key --API秘钥
content--|用户提示词
prompt --系统提示词
file_path --图片路径 (JPEG/PNG/BMP,最大10MB,部分模型不一定三种格式图片都支持)
timeout--超时时间(秒)
temperature-- 温度
max_output_length --最大输出长度(token)
出参:
sRet--命令运行的结果赋值给此变量
注意事项:
删除大模型的环境变量配置文件或在大模型配置管理界面中删除已调用的大模型,命令将无法正常运行
*********************************************************************/
LLM.GeneralChat({"name":"deepseek","model":"openai/deepseek-chat","api_key":"$ENV.deepseek_api_key","base_url":"https://api.deepseek.com"},"帮我将hello翻译成中文","","",30,0.7,4000)
可视化样例
