Start Me
Pasta
累计调用:1141
超拟人角色扮演
GET支持基于人设的角色扮演、超长多轮的记忆、千人千面的角色对话,广泛应用于情感陪伴、游戏智能NPC、网红/明星/影视剧IP分身、数字人/虚拟主播、文字冒险游戏等拟人对话或游戏场景。
接口地址:
https://api.qster.top/API/v1/CharacterGLM
接口示例:
https://api.qster.top/API/v1/CharacterGLM/?msg=我刚刚说了什么&character=我是陆星辰,是一个男性,是一位知名导演,也是苏梦远的合作导演。我擅长拍摄音乐题材的电影。苏梦远对我的态度是尊敬的,并视我为良师益友。
请求参数
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
msg | string | 是 | 对话内容 |
model | string | 否 | 聊天模型 默认gpt-4o-mini 支持gpt-4o-mini、claude-3-haiku、mixtral-8x7b、llama-3.1-70b、Yi-1.5-9B-16K、TeleMM、DeepSeek-V2.5、Qwen2.5-72B、Qwen2.5-72B-128K、Qwen2.5-Math-72B、Hunyuan-A52B |
type | string | 否 | 默认json 可选json/text |
character | string | 否 | 模型自定义角色 例如 “是一个导演” |
sessionid | string | 否 | 临时会话缓存ID 支持上下文聊天, 只存在会话ID时可查看过去的会话内容 |
qskey | string | 否 | 申请临时密钥 |
响应参数
参数 | 说明 |
---|---|
problem | 你给出的问题或者配置有问题 |
choices.message.content | 聊天返回消息 |
code | 200正常400失败 查看更多 |
代码示例
<?php
// 要调用的 URL
$url = "https://api.qster.top/API/v1/CharacterGLM";
// 参数数组
$params = [
"msg" => "对话内容",
"model" => "聊天模型 默认gpt-4o-mini 支持gpt-4o-mini、claude-3-haiku、mixtral-8x7b、llama-3.1-70b、Yi-1.5-9B-16K、TeleMM、DeepSeek-V2.5、Qwen2.5-72B、Qwen2.5-72B-128K、Qwen2.5-Math-72B、Hunyuan-A52B",
"type" => "默认json 可选json/text",
"character" => "模型自定义角色 例如 “是一个导演”",
"sessionid" => "临时会话缓存ID 支持上下文聊天, 只存在会话ID时可查看过去的会话内容",
"qskey" => "0",
];
// 使用 http_build_query 将参数转换为查询字符串
$queryString = http_build_query($params);
// 在 URL 中添加查询字符串
$finalUrl = $url . '?' . $queryString;
// 使用 file_get_contents 获取内容
$response = file_get_contents($finalUrl);
// 输出响应
echo $response;
?>
import requests
url = "https://api.qster.top/API/v1/CharacterGLM";
params = {
"msg" : "对话内容",
"model" : "聊天模型 默认gpt-4o-mini 支持gpt-4o-mini、claude-3-haiku、mixtral-8x7b、llama-3.1-70b、Yi-1.5-9B-16K、TeleMM、DeepSeek-V2.5、Qwen2.5-72B、Qwen2.5-72B-128K、Qwen2.5-Math-72B、Hunyuan-A52B",
"type" : "默认json 可选json/text",
"character" : "模型自定义角色 例如 “是一个导演”",
"sessionid" : "临时会话缓存ID 支持上下文聊天, 只存在会话ID时可查看过去的会话内容",
"qskey" => "0"
}
response = requests.get(url, params=params)
print(response.text)
function fetchData(url, params) {
const queryString = Object.keys(params)
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
.join('&');
const fullUrl = `${url}?${queryString}`;
fetch(fullUrl)
.then(response => response.text())
.then(data => {
const resultElement = document.createElement('pre');
resultElement.textContent = data;
document.body.appendChild(resultElement);
})
.catch(error => console.error('Error fetching data:', error));
}
// 示例用法
const url = "https://api.qster.top/API/v1/CharacterGLM";
const params = {
"msg" : "对话内容",
"model" : "聊天模型 默认gpt-4o-mini 支持gpt-4o-mini、claude-3-haiku、mixtral-8x7b、llama-3.1-70b、Yi-1.5-9B-16K、TeleMM、DeepSeek-V2.5、Qwen2.5-72B、Qwen2.5-72B-128K、Qwen2.5-Math-72B、Hunyuan-A52B",
"type" : "默认json 可选json/text",
"character" : "模型自定义角色 例如 “是一个导演”",
"sessionid" : "临时会话缓存ID 支持上下文聊天, 只存在会话ID时可查看过去的会话内容",
"qskey" => "0"
};
fetchData(url, params);