# Send Pywayne Llm Chat Bot to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "chat-bot",
    "name": "Pywayne Llm Chat Bot",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/wangyendt/chat-bot",
    "canonicalUrl": "https://clawhub.ai/wangyendt/chat-bot",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/chat-bot",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=chat-bot",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/chat-bot"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/chat-bot",
    "downloadUrl": "https://openagent3.xyz/downloads/chat-bot",
    "agentUrl": "https://openagent3.xyz/skills/chat-bot/agent",
    "manifestUrl": "https://openagent3.xyz/skills/chat-bot/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/chat-bot/agent.md"
  }
}
```
## Documentation

### Pywayne LLM Chat Bot

This module provides a synchronous LLM chat interface compatible with OpenAI APIs (including local servers like Ollama).

### Quick Start

from pywayne.llm.chat_bot import LLMChat

# Create chat instance
chat = LLMChat(
    base_url="https://api.example.com/v1",
    api_key="your_api_key",
    model="deepseek-chat"
)

# Single-turn conversation (non-streaming)
response = chat.ask("Hello, LLM!", stream=False)
print(response)

# Streaming response
for token in chat.ask("Explain recursion", stream=True):
    print(token, end='', flush=True)

### Multi-turn Conversation

# Use chat() for history tracking
for token in chat.chat("What is a class in Python?"):
    print(token, end='', flush=True)

# Continuation - remembers previous context
for token in chat.chat("How do I define a constructor?"):
    print(token, end='', flush=True)

# View history
for msg in chat.history:
    print(f"{msg['role']}: {msg['content']}")

# Clear history
chat.clear_history()

### LLMConfig Class

from pywayne.llm.chat_bot import LLMConfig

config = LLMConfig(
    base_url="https://api.example.com/v1",
    api_key="your_api_key",
    model="deepseek-chat",
    temperature=0.7,
    max_tokens=8192,
    top_p=1.0,
    frequency_penalty=0.0,
    presence_penalty=0.0,
    system_prompt="You are a helpful assistant"
)

chat = LLMChat(**config.to_dict())

### Dynamic System Prompt Update

chat.update_system_prompt("You are now a Python expert, provide code examples")

### Managing Multiple Sessions

from pywayne.llm.chat_bot import ChatManager

manager = ChatManager(
    base_url="https://api.example.com/v1",
    api_key="your_api_key",
    model="deepseek-chat",
    timeout=300  # Session timeout in seconds
)

# Get or create chat instance (maintains per-session history)
chat1 = manager.get_chat("user1")
chat2 = manager.get_chat("user2")

# Sessions are independent
chat1.chat("Hello from user1")
chat2.chat("Hello from user2")

# Remove a session
manager.remove_chat("user1")

### Custom Configuration per Session

custom_config = LLMConfig(
    base_url=base_url,
    api_key=api_key,
    model="deepseek-chat",
    temperature=0.9,
    system_prompt="You are a creative writer"
)

chat3 = manager.get_chat("user3", config=custom_config)

### LLMChat

MethodDescriptionask(prompt, stream=False)Single-turn conversation without historychat(prompt, stream=True)Multi-turn conversation with history trackingupdate_system_prompt(prompt)Update system prompt in-placeclear_history()Clear conversation history (keeps system prompt)history (property)Get copy of current conversation history

### ChatManager

MethodDescriptionget_chat(chat_id, stream=True, config=None)Get or create chat instance by IDremove_chat(chat_id)Remove chat session

### Parameters

ParameterDefaultDescriptionbase_urlrequiredAPI base URL (e.g., https://api.deepseek.com/v1)api_keyrequiredAPI authentication keymodel"deepseek-chat"Model nametemperature0.7Controls randomness (0-2)max_tokens2048/8192Maximum output tokenstop_p1.0Nucleus sampling (0-1)frequency_penalty0.0Reduces repetition (-2 to 2)presence_penalty0.0Encourages new topics (-2 to 2)system_prompt"你是一个严谨的助手"System messagetimeoutinfSession timeout in seconds (ChatManager only)
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: wangyendt
- Version: 0.1.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-30T16:55:25.780Z
- Expires at: 2026-05-07T16:55:25.780Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/chat-bot)
- [Send to Agent page](https://openagent3.xyz/skills/chat-bot/agent)
- [JSON manifest](https://openagent3.xyz/skills/chat-bot/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/chat-bot/agent.md)
- [Download page](https://openagent3.xyz/downloads/chat-bot)