Claude Code 指南
配置 Flaq AI Claude 模型并探索 Claude Code 技能
通过 Flaq AI 稳定、实惠的 API 体验 OpenAI GPT 6 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-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-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-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 Sol Web Search API 将 GPT-6 Sol 推理与网页检索相结合,在 Flaq AI 上支持研究和市场分析。该网页搜索 API 集成帮助开发者和研究团队调查持续变化的主题、比较公开来源,并根据对话消息编写简报。在依赖结果之前,团队应对照原始来源核实重要论断。
注意 请确保提示词、附件素材和检索任务符合 OpenAI 使用政策、Flaq AI 条款及适用的网站服务条款。如果出现错误,请缩小查询范围、移除受限词语或附件,然后重试。
GPT 6 Sol Web Search 与 GPT 6 Astra Web Search
GPT 6 Astra 是 OpenAI 面向最高难度推理工作的旗舰选择。GPT 6 Sol Web Search 在研究能力与成本之间取得平衡,适用于日常生产工作流。
GPT 6 Sol Web Search 与 GPT 6 Luna Web Search
GPT 6 Luna Web Search 适合成本敏感的大批量查询。当工作流需要更长篇幅的比较,以及对相互矛盾来源的细致审查时,可以选择 GPT 6 Sol Web Search。
GPT 6 Sol Web Search 与搜索优先的答案引擎
搜索优先的答案引擎通常侧重链接和简短回答。GPT 6 Sol Web Search 可以围绕用户的问题,将检索材料整理为更长篇幅的说明和比较。
GPT 6 Sol Web Search 与 Gemini Grounded Search
Gemini 基于检索的搜索模型专为 Google 生态集成和原生网页工具设计。GPT 6 Sol Web Search 提供 OpenAI 原生检索方案,并通过 Flaq AI 统一的聊天补全 API 为混合文本、图片和文档上下文提供强大支持。
配置 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