package
0.2.7
Repository: https://github.com/hibugenterprise/gotools.git
Documentation: pkg.go.dev

# Functions

CreateChat 使用stream字段判断是否为流式对话,data为http请求体, 模型侧接口统一使用post请求,故使用any类型承接请求体兼容模型侧的不同api.
NoStreamChat 创建非流式回答,data为请求体.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LLMAnswer 模型返回的结果,在 非流式的格式中模型返回的消息在 LLMAnswer.choices[index].message.content中 流式的格式中模型返回的消息在 LLMAnswer.choices[index].delta.content中 非流式 { "id": "string", "object": "string", "created": 0, "model": "string", "choices": [ { "index": 0, "message": { "role": "string", "content": "string" }, "finish_reason": "string" } ], "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0 }, "corr_lst": [ "string" ], "code": 0 } 流式 { "id": "string", "object": "string", "created": 0, "model": "string", "choices": [ { "index": 0, "delta": { "role": "string", "content": "string" }, "finish_reason": "string", "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0 } } ], "corr_lst": [ "string" ], "code": 0 }.
No description provided by the author
No description provided by the author
No description provided by the author