メインコンテンツまでスキップ

Iroha

Iroha は、クリエイティブなストーリーテリングとナラティブ生成に特化した Rustellar の専門 AI モデルです。

概要

Iroha は Mamba アーキテクチャに基づいて構築されており、魅力的で文脈豊かなナラティブを生成するために特別にチューニングされた最先端モデルです。日本語の「色」にちなんで名付けられた Iroha は、ストーリー生成に鮮やかな創造性をもたらします。

主な機能

ストーリー生成における優秀性

Iroha が得意とする領域:

  • クリエイティブフィクション執筆
  • キャラクター対話の生成
  • プロット展開とナラティブアーク
  • 世界構築と描写
  • 脚本とシナリオ執筆

技術仕様

仕様
アーキテクチャMamba
コンテキストウィンドウ16,384 トークン
最大出力8,192 トークン
対応言語文学的表現に重点を置いた 95 以上の言語
学習データの基準日2025 年 1 月

ユースケース

小説執筆アシスタント

import requests

# 小説執筆アシスタントの設定
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are a creative writing assistant. "
"Write engaging, vivid narratives with rich descriptions "
"and compelling character development."
},
{
"role": "user",
"content": "Write the opening chapter of a sci-fi novel about "
"a colony on Mars discovering ancient ruins."
}
],
"temperature": 0.9, # 高い創造性のため高めに設定
"max_tokens": 2000
}
)

print(response.json()['choices'][0]['message']['content'])

キャラクター対話ジェネレーター

# キャラクター対話生成の例
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are a dialogue writer. Create natural, "
"character-driven conversations that reveal personality "
"and advance the plot."
},
{
"role": "user",
"content": "Write a tense dialogue between a detective and a "
"suspect in a noir crime story. The detective suspects "
"the person but has no proof."
}
],
"temperature": 0.85, # 自然な対話のため高めに設定
"max_tokens": 1500
}
)

print(response.json()['choices'][0]['message']['content'])

インタラクティブストーリー生成

# インタラクティブストーリーの例
def continue_story(story_context, user_choice):
"""
ユーザーの選択に基づいてストーリーを継続
"""
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are an interactive story narrator. "
"Continue the story based on the user's choices, "
"maintaining consistency and dramatic tension."
},
{
"role": "assistant",
"content": story_context
},
{
"role": "user",
"content": f"The protagonist chooses to: {user_choice}. "
"Continue the story."
}
],
"temperature": 0.9,
"max_tokens": 1000
}
)

return response.json()['choices'][0]['message']['content']

# 使用例
initial_story = """
You stand at the entrance of a dark cave.
Strange sounds echo from within.
A mysterious light flickers in the depths.
"""

next_part = continue_story(
initial_story,
"enter the cave cautiously with torch in hand"
)

print(next_part)

脚本執筆

# 脚本執筆の例
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are a professional screenplay writer. "
"Write in proper screenplay format with scene headings, "
"action lines, and dialogue."
},
{
"role": "user",
"content": "Write a dramatic scene where two estranged siblings "
"meet for the first time in ten years at their "
"childhood home."
}
],
"temperature": 0.8,
"max_tokens": 2000
}
)

print(response.json()['choices'][0]['message']['content'])

パフォーマンス特性

応答速度

Iroha は速度よりも品質を優先します:

  • 短いナラティブ (< 500 トークン): 1-2 秒
  • 中程度のストーリー (500-1500 トークン): 3-6 秒
  • 長文コンテンツ (1500 以上のトークン): 6-15 秒

創造性メトリクス

Iroha は以下の分野で優れたパフォーマンスを示します:

  • ✅ 長文テキスト全体のナラティブ一貫性
  • ✅ キャラクターボイスの一貫性
  • ✅ 描写的で雰囲気のある文章
  • ✅ プロット展開とペース配分
  • ✅ 創造的なメタファーとイメージ

ベストプラクティス

ストーリーテリングのための温度設定

異なるナラティブスタイルに最適な温度:

# 構造化されたプロット(低〜中温度)
# 推奨: 0.6 - 0.8
{
"temperature": 0.7,
"use_cases": ["Structured plots", "Technical writing", "Scripts"]
}

# クリエイティブな描写(中〜高温度)
# 推奨: 0.8 - 1.0
{
"temperature": 0.9,
"use_cases": ["Creative fiction", "Poetry", "Character-driven narratives"]
}

# 実験的・抽象的表現(高温度)
# 推奨: 1.1 - 1.5
{
"temperature": 1.3,
"use_cases": ["Experimental fiction", "Stream of consciousness", "Abstract narratives"]
}

ジャンルの一貫性のためのシステムメッセージ

システムメッセージでジャンルとスタイルを定義します:

# ジャンル別システムメッセージの例

# ファンタジー
fantasy_system = {
"role": "system",
"content": "You are a fantasy author in the style of epic fantasy. "
"Use rich, archaic language and vivid world-building. "
"Focus on heroic themes and magical elements."
}

# ミステリー
mystery_system = {
"role": "system",
"content": "You are a mystery writer. Craft suspenseful narratives "
"with subtle clues and red herrings. Maintain tension and "
"reveal information strategically."
}

# SF
scifi_system = {
"role": "system",
"content": "You are a science fiction author. Ground your stories "
"in plausible science while exploring imaginative concepts. "
"Focus on technological and societal implications."
}

# ロマンス
romance_system = {
"role": "system",
"content": "You are a romance novelist. Write emotionally engaging "
"stories focused on character relationships and personal growth. "
"Balance tension with heartwarming moments."
}

長編ストーリー生成

複数章の作品には会話履歴を使用します:

def generate_multi_chapter_story(premise, num_chapters=5):
"""
複数章からなるストーリーを生成
"""
messages = [
{
"role": "system",
"content": "You are a novelist. Write cohesive multi-chapter "
"stories with consistent characters and plot development."
},
{
"role": "user",
"content": f"Write a {num_chapters}-chapter story based on this "
f"premise: {premise}. Start with Chapter 1."
}
]

chapters = []

for i in range(num_chapters):
# 各章を生成
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": messages,
"temperature": 0.9,
"max_tokens": 2000
}
)

chapter_content = response.json()['choices'][0]['message']['content']
chapters.append(chapter_content)

# 会話履歴に追加
messages.append({"role": "assistant", "content": chapter_content})

# 次の章をリクエスト(最終章でない場合)
if i < num_chapters - 1:
messages.append({
"role": "user",
"content": f"Continue with Chapter {i + 2}."
})

return chapters

# 使用例
story_chapters = generate_multi_chapter_story(
"A time traveler accidentally changes a small detail in the past, "
"leading to unexpected consequences in the present.",
num_chapters=3
)

for i, chapter in enumerate(story_chapters, 1):
print(f"\n=== Chapter {i} ===\n")
print(chapter)

キャラクターの一貫性の維持

詳細なキャラクタープロファイルを使用します:

# キャラクター一貫性を保つためのプロンプト設計
character_profile = """
Character Profile:
- Name: Sarah Chen
- Age: 28
- Occupation: Marine biologist
- Personality: Curious, cautious, empathetic
- Speaking style: Precise, uses scientific terms, but warm
- Background: Grew up near the ocean, lost her father to a diving accident
- Current goal: Discover a new species of deep-sea creature
"""

response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": f"You are writing a story. Maintain strict character "
f"consistency with this profile:\n\n{character_profile}"
},
{
"role": "user",
"content": "Write a scene where Sarah discovers something "
"unexpected during a deep-sea dive."
}
],
"temperature": 0.85,
"max_tokens": 1500
}
)

print(response.json()['choices'][0]['message']['content'])

料金

Iroha はトークンベースの料金を使用します:

トークンタイプ100 万トークンあたりの料金
入力$0.75
出力$2.00

詳細については、料金ページをご覧ください。

Helix v1 との比較

機能IrohaHelix v1
最適な用途ストーリー生成一般的な会話
アーキテクチャMambaTransformer
コンテキストウィンドウ16,384 トークン8,192 トークン
最大出力8,192 トークン4,096 トークン
創造性高い中程度
応答速度中速より高速

制限事項

Iroha はクリエイティブライティングに優れていますが、以下の制限事項に注意してください:

  1. 速度: 創造性の最適化により Helix v1 より遅い
  2. 事実タスク: 事実的な Q&A や技術ドキュメントには最適化されていません
  3. コード生成: プログラミングタスクの能力は限定的
  4. 構造化データ: 構造化された出力よりも散文に適しています
  5. 一貫性: 非常に長いナラティブでは時折プロットの不整合が発生する可能性があります

クリエイティブライティングのヒント

より良いストーリーのためのプロンプト

# ❌ 悪い例: 曖昧で方向性がない
"Write a story."

# ✅ 良い例: 具体的で詳細
"Write a 1500-word mystery story set in 1920s Paris. "
"The protagonist is a jazz singer who witnesses a crime. "
"Use first-person perspective and maintain a noir atmosphere. "
"Include vivid descriptions of the jazz club setting."

スタイル転写のための例の使用

# スタイル例を提供
style_example = """
The rain fell like forgotten memories, each drop a whisper of what once was.
Marcus stood beneath the awning, watching the city blur into watercolor grays.
"""

response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are a literary fiction writer. Match the "
"writing style of the provided example."
},
{
"role": "user",
"content": f"Here's an example of the writing style to match:\n\n"
f"{style_example}\n\n"
f"Now write a paragraph about a character entering "
f"an old bookstore, using the same atmospheric style."
}
],
"temperature": 0.85,
"max_tokens": 500
}
)

print(response.json()['choices'][0]['message']['content'])

サポート

Iroha に関する技術サポートや質問については:

関連リソース