Claude Code 가이드
Flaq AI Claude 모델을 설정하고 Claude Code 스킬 살펴보기
Qwen Flash Character API를 무료로 사용해 보고, 빠른 페르소나 중심 텍스트 역할극, 프로필, 장기 기억, 확장 가능한 대화 워크플로를 구축하세요. 캐릭터 테스트, 챗봇, Alibaba LLM 앱에 적합합니다.
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: 'qwen-flash-character',
messages: [
{
role: 'system',
content: 'You are a calm library assistant who speaks briefly and vividly.'
},
{
role: 'user',
content: 'Introduce yourself in three sentences.'
}
],
stream: true,
max_tokens: 800,
temperature: 0.7,
seed: 12345
})
});
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': 'qwen-flash-character',
'messages': [
{
'role': 'system',
'content': 'You are a calm library assistant who speaks briefly and vividly.',
},
{
'role': 'user',
'content': 'Introduce yourself in three sentences.',
},
],
'stream': True,
'max_tokens': 800,
'temperature': 0.7,
'seed': 12345,
},
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": "qwen-flash-character",
"messages": [
{
"role": "system",
"content": "You are a calm library assistant who speaks briefly and vividly."
},
{
"role": "user",
"content": "Introduce yourself in three sentences."
}
],
"stream": true,
"max_tokens": 800,
"temperature": 0.7,
"seed": 12345
}'
| 매개변수 | 가격 | 원래 가격 | 할인 |
|---|
Flaq AI의 Qwen Flash Character API는 채팅 제품, 컴패니언 앱, 스토리텔링 시스템, 페르소나 중심 워크플로를 위해 빠르고 비용 효율적인 Alibaba 캐릭터 롤플레이 LLM 액세스를 제공합니다. 이 합리적인 Qwen API 통합은 프롬프트 기반 톤, 프로필 설정, 대화 컨텍스트를 지원하면서 개발자가 캐릭터 일관 텍스트 응답을 빠르게 생성하도록 돕습니다. 빠른 반복, 대량 대화 테스트, 확장 가능한 롤플레이 기능을 위해 설계되었습니다.
system 메시지를 통해 캐릭터 배경, 톤, 말투, 응답 동작을 정의하고, 장기 메모리 모드에서는 profile을 사용합니다.enable_long_term_memory, profile, 사용자 정의 x-session 값을 사용해 관련 대화 간에 메모리를 재사용합니다.partial: true가 포함된 assistant 접두어를 사용해 여러 화자 장면을 시뮬레이션합니다.partial 이어쓰기 메시지.그룹 채팅 시뮬레이션에서는 화자 이름을 profile에서 추론하지 않습니다. 각 메시지 시작 부분에 이름을 직접 추가한 다음, Ling Lu: 같은 마지막 assistant 메시지를 추가하고 partial: true를 설정하면 모델이 해당 캐릭터로 계속 답합니다.
참고 프롬프트, 캐릭터 프로필, 메모리 사용, 생성 텍스트가 Alibaba 및 Flaq AI 안전 요구사항을 준수하는지 확인하세요. 오류가 발생하면 요청, 프로필 또는 생성 설정을 수정한 뒤 다시 시도하세요.
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 사용