mirror of
https://github.com/LLM-Red-Team/glm-free-api.git
synced 2024-12-22 17:09:22 +08:00
支持指定绘图的智能体
This commit is contained in:
parent
6226615f53
commit
1b1b3dd322
@ -369,21 +369,19 @@ async function createCompletionStream(
|
||||
}
|
||||
|
||||
async function generateImages(
|
||||
model = MODEL_NAME,
|
||||
model = '65a232c082ff90a2ad2f15e2',
|
||||
prompt: string,
|
||||
refreshToken: string,
|
||||
retryCount = 0
|
||||
) {
|
||||
return (async () => {
|
||||
const messages = [{ role: "user", content: prompt }];
|
||||
// 官方AI绘图的智能体ID
|
||||
const assistantId = "65a232c082ff90a2ad2f15e2";
|
||||
// 请求流
|
||||
const token = await acquireToken(refreshToken);
|
||||
const result = await axios.post(
|
||||
"https://chatglm.cn/chatglm/backend-api/assistant/stream",
|
||||
{
|
||||
assistant_id: assistantId,
|
||||
assistant_id: model,
|
||||
conversation_id: "",
|
||||
messages: messagesPrepare(messages, []),
|
||||
meta_data: {
|
||||
|
Loading…
Reference in New Issue
Block a user