Claude Code 指南
配置 Flaq AI Claude 模型并探索 Claude Code 技能
通过 Flaq AI 稳定、实惠且支持流式输出的 API,体验 OpenAI GPT 6.1 Sol API 的网页搜索、在线研究和基于最新信息的问答能力。围绕研究问题检索网页,辅助整理相关信息。
const response = await fetch('https://api.flaq.ai/api/v1/chat/completions', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
Accept: 'text/event-stream',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'gpt-6.1-sol-web-search',
messages: [
{
role: 'user',
content: 'Find the latest public information about Flaq AI and summarize it for a product brief.'
}
],
stream: true,
max_tokens: 2048
})
});
if (!response.ok) {
const errorBody = await response.json().catch(() => null);
throw new Error(errorBody?.error?.message ?? errorBody?.message ?? `HTTP ${response.status}`);
}
const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = '';
let assistantText = '';
while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });
const frames = buffer.split(/\r?\n\r?\n/);
buffer = frames.pop() || '';
for (const frame of frames) {
const lines = frame.split(/\r?\n/).filter(Boolean);
let eventName = 'message';
const dataLines = [];
for (const line of lines) {
if (line.startsWith('event:')) {
eventName = line.slice(6).trim();
} else if (line.startsWith('data:')) {
dataLines.push(line.replace(/^data:\s*/, ''));
}
}
const raw = dataLines.join('\n').trim();
if (raw === '[DONE]') {
console.log('\nFinal text:', assistantText);
continue;
}
let payload;
try {
payload = JSON.parse(raw);
} catch {
continue;
}
if (eventName === 'error' || payload.error) {
const msg = payload.error?.message ?? payload.message ?? 'Chat request failed';
throw new Error(msg);
}
const delta = payload.choices?.[0]?.delta;
if (delta?.content) {
assistantText += delta.content;
console.log(assistantText);
}
}
}
import json
import requests
response = requests.post(
'https://api.flaq.ai/api/v1/chat/completions',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'text/event-stream',
'Content-Type': 'application/json',
},
json={
'model': 'gpt-6.1-sol-web-search',
'messages': [
{
'role': 'user',
'content': 'Find the latest public information about Flaq AI and summarize it for a product brief.',
}
],
'stream': True,
'max_tokens': 2048,
},
stream=True,
)
response.raise_for_status()
event_name = 'message'
assistant_text = ''
for raw_line in response.iter_lines(decode_unicode=True):
if not raw_line:
event_name = 'message'
continue
if raw_line.startswith('event:'):
event_name = raw_line.replace('event:', '', 1).strip()
continue
if raw_line.startswith('data:'):
raw_data = raw_line.replace('data:', '', 1).strip()
if raw_data == '[DONE]':
print('\nFinal text:', assistant_text)
continue
payload = json.loads(raw_data)
if event_name == 'error' or payload.get('error'):
error = payload.get('error') or payload
raise RuntimeError(error.get('message', 'Chat request failed'))
choices = payload.get('choices') or []
if choices:
delta = choices[0].get('delta') or {}
content = delta.get('content')
if content:
assistant_text += content
print(content, end='', flush=True)
curl -N -X POST "https://api.flaq.ai/api/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: text/event-stream" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.1-sol-web-search",
"messages": [
{
"role": "user",
"content": "Find the latest public information about Flaq AI and summarize it for a product brief."
}
],
"stream": true,
"max_tokens": 2048
}'
| 参数 | 价格 | 原价 | 折扣 |
|---|
GPT 6.1 Sol Web Search API 在 Flaq AI 上支持借助搜索的问答和研究工作流。提供研究主题、 所需信息以及相关背景,即可请求能够使用网页搜索的文字回答。此接口 将基于消息的交互与可选的辅助附件、流式响应和可调节的输出 长度结合起来,适用于需要处理在线信息的应用。
网页搜索能力: 对于需要查找超出对话中已提供背景信息的问题, 可使用支持搜索的接口。
提示词引导的研究: 指定研究主题、时间段和期望范围,让请求聚焦于 应用所需的信息。
辅助参考输入: 在文字问题中附加受支持的文件或图片,为研究 任务提供更多背景。
对话式细化: 通过追问缩小主题范围,或要求对 先前回答作出更清晰的解释。
流式研究响应: 逐步返回生成的文字,提供交互式研究体验。
可调节的回答长度: 设置输出 token 上限,并说明需要简洁概述还是 更充分展开的回答。
输入: 文字形式的研究问题、相关对话背景,以及可选的受支持图片或文件 附件。
输出: 通过支持网页搜索的模型接口生成的文字回答。
控制项: 提示词中的研究范围、可选的输出 token 上限,以及是否使用流式响应。
能力: 借助搜索的问答、在线研究摘要,以及对某个主题的后续探索。
研究助手: 帮助用户调查主题,并细化希望探索的问题。
产品研究: 为产品对比简报收集信息,并在 作出决策前核查原始来源。
行业简报: 请求针对指定主题和时间段内动态的重点概述。
文档查找: 查找与技术问题相关的信息,并对照原始 文档进行核实。
结合背景的调查: 将上传的参考资料与需要额外在线 信息的问题结合起来。
注意 请说明相关日期范围,并在依赖研究回答前核查来源日期和原始页面。 能够访问网页并不保证每个相关页面都可用,也不保证返回的所有陈述都是最新的。
GPT 6.1 Sol Web Search 与 GPT 6.1 Sol Text-to-Text Text-to-Text 处理已提供的消息,不使用网页搜索。 Web Search 接口则针对需要在线信息的问题进行了配置。
GPT 6.1 Sol Web Search 与 GPT 6.1 Sol File Analysis File Analysis 以用户上传的材料为核心。Web Search 支持超出这些附件范围的研究,同时保留可选的参考输入。
GPT 6.1 Sol Web Search 与 GPT 6.1 Sol Image-to-Text Image-to-Text 专注于描述已提供的图片,或回答 与图片有关的问题。Web Search 处理文字研究问题,并可将图片用作辅助背景。
GPT 6.1 Sol Web Search 与 Claude Sonnet 5.5 File Analysis Claude 的 File Analysis 配置接受文档 和图片,但不启用网页搜索。当任务还依赖在线资料时, 此 GPT 接口提供支持搜索的选项。
配置 Flaq AI Claude 模型并探索 Claude Code 技能

配置 Flaq AI GPT 模型并探索 Codex 技能
在 Hermes Agent 中使用 Flaq AI LLM 模型
在 ZCode 中使用 GLM 5.2、Kimi K3 和 DeepSeek v4
使用 Flaq AI DeepSeek 模型运行 DeepSeek Harness
将 AI 智能体连接到 Flaq 图像和视频生成工具
在 WorkBuddy 中使用 GPT 6 Astra 和 Claude Fable 5.1