Claude Code 指南
設定 Flaq AI Claude 模型並探索 Claude Code 技能
透過 Flaq AI 穩定、實惠且支援串流回應的 API,體驗 OpenAI GPT 6 Astra 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-astra-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
})
});
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('\n\n');
buffer = frames.pop() || '';
for (const frame of frames) {
const lines = frame.split('\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-astra-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-astra-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 Astra Web Search API 在 Flaq AI 上結合 OpenAI 旗艦 GPT-6 Astra 的推理能力與網路檢索,用於複雜研究。開發者和專業團隊可透過整合此網路搜尋 API,根據對話訊息調查即時問題、比較公開來源,並綜合產出有證據支持的答案。
注意 提示詞、附件及搜尋任務須符合 OpenAI 使用政策、Flaq AI 條款及適用的網站規則。如果請求失敗,請縮小問題範圍、移除受限資料後重試。
GPT 6 Astra 與 GPT 5.6 Sol Web Search
GPT 5.6 Sol Web Search 是 Flaq AI 上的上一代 OpenAI 旗艦研究 API。當調查需要在網路檢索基礎上使用更新的 GPT 推理能力時,GPT 6 Astra 是目前的旗艦選擇。
GPT 6 Astra 與 Claude Fable 5.1 Web Search
Flaq AI 上的 Claude Fable 5.1 Web Search 是純文字研究入口。GPT 6 Astra Web Search 可在提問時附上支援的圖片和文件,這對以螢幕截圖、備忘錄或來源檔案為起點的調查尤其重要。
GPT 6 Astra 與 Gemini Grounded Search
Gemini 搜尋工作流程自然適用於以 Google 為核心的產品。對於希望透過 Flaq AI 進行即時研究與來源比較的團隊,GPT 6 Astra Web Search API 是 OpenAI 的旗艦選擇。
GPT 6 Astra 與搜尋優先的答案引擎
搜尋優先的引擎著重於快速提供網路答案,以及凸顯連結的摘要。GPT 6 Astra Web Search 強調對檢索資料進行旗艦級推理,更適合需要綜合分析及持續追問,而非僅需獨立搜尋框的產品。
設定 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