Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20af2a9f4b | ||
|
|
c179fcd3eb | ||
|
|
89d16ae513 | ||
|
|
72867c930e | ||
|
|
eddddd5034 |
19
.github/workflows/ci.yml
vendored
@@ -19,6 +19,25 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Remove unnecessary files to release disk space
|
||||
run: |
|
||||
sudo rm -rf \
|
||||
"$AGENT_TOOLSDIRECTORY" \
|
||||
/opt/ghc \
|
||||
/opt/google/chrome \
|
||||
/opt/microsoft/msedge \
|
||||
/opt/microsoft/powershell \
|
||||
/opt/pipx \
|
||||
/usr/lib/mono \
|
||||
/usr/local/julia* \
|
||||
/usr/local/lib/android \
|
||||
/usr/local/lib/node_modules \
|
||||
/usr/local/share/chromium \
|
||||
/usr/local/share/powershell \
|
||||
/usr/local/share/powershell \
|
||||
/usr/share/dotnet \
|
||||
/usr/share/swift
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
|
||||
19
.github/workflows/test-container-build.yml
vendored
@@ -14,6 +14,25 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Remove unnecessary files to release disk space
|
||||
run: |
|
||||
sudo rm -rf \
|
||||
"$AGENT_TOOLSDIRECTORY" \
|
||||
/opt/ghc \
|
||||
/opt/google/chrome \
|
||||
/opt/microsoft/msedge \
|
||||
/opt/microsoft/powershell \
|
||||
/opt/pipx \
|
||||
/usr/lib/mono \
|
||||
/usr/local/julia* \
|
||||
/usr/local/lib/android \
|
||||
/usr/local/lib/node_modules \
|
||||
/usr/local/share/chromium \
|
||||
/usr/local/share/powershell \
|
||||
/usr/local/share/powershell \
|
||||
/usr/share/dotnet \
|
||||
/usr/share/swift
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
|
||||
3
.gitignore
vendored
@@ -31,4 +31,5 @@ scenes/
|
||||
!scenes/infinity-quest/infinity-quest.json
|
||||
tts_voice_samples/*.wav
|
||||
third-party-docs/
|
||||
legacy-state-reinforcements.yaml
|
||||
legacy-state-reinforcements.yaml
|
||||
CLAUDE.md
|
||||
18
Dockerfile
@@ -45,6 +45,9 @@ WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
bash \
|
||||
wget \
|
||||
tar \
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install uv in the final stage
|
||||
@@ -53,6 +56,21 @@ RUN pip install uv
|
||||
# Copy virtual environment from backend-build stage
|
||||
COPY --from=backend-build /app/.venv /app/.venv
|
||||
|
||||
# Download and install FFmpeg 8.0 with shared libraries into .venv (matching Windows installer approach)
|
||||
# Using BtbN FFmpeg builds which provide shared libraries - verified to work
|
||||
# Note: We tried using jrottenberg/ffmpeg:8.0-ubuntu image but copying libraries from it didn't work properly,
|
||||
# so we use the direct download approach which is more reliable and matches the Windows installer
|
||||
RUN cd /tmp && \
|
||||
wget -q https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl-shared.tar.xz -O ffmpeg.tar.xz && \
|
||||
tar -xf ffmpeg.tar.xz && \
|
||||
cp -a ffmpeg-master-latest-linux64-gpl-shared/bin/* /app/.venv/bin/ && \
|
||||
cp -a ffmpeg-master-latest-linux64-gpl-shared/lib/* /app/.venv/lib/ && \
|
||||
rm -rf ffmpeg-master-latest-linux64-gpl-shared ffmpeg.tar.xz && \
|
||||
LD_LIBRARY_PATH=/app/.venv/lib /app/.venv/bin/ffmpeg -version | head -n 1
|
||||
|
||||
# Set LD_LIBRARY_PATH so torchcodec can find ffmpeg libraries at runtime
|
||||
ENV LD_LIBRARY_PATH=/app/.venv/lib:${LD_LIBRARY_PATH}
|
||||
|
||||
# Copy Python source code
|
||||
COPY --from=backend-build /app/src /app/src
|
||||
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
"""
|
||||
An attempt to write a client against the runpod serverless vllm worker.
|
||||
|
||||
This is close to functional, but since runpod serverless gpu availability is currently terrible, i have
|
||||
been unable to properly test it.
|
||||
|
||||
Putting it here for now since i think it makes a decent example of how to write a client against a new service.
|
||||
"""
|
||||
|
||||
import pydantic
|
||||
import structlog
|
||||
import runpod
|
||||
import asyncio
|
||||
import aiohttp
|
||||
from talemate.client.base import ClientBase, ExtraField
|
||||
from talemate.client.registry import register
|
||||
from talemate.emit import emit
|
||||
from talemate.config import Client as BaseClientConfig
|
||||
|
||||
log = structlog.get_logger("talemate.client.runpod_vllm")
|
||||
|
||||
|
||||
class Defaults(pydantic.BaseModel):
|
||||
max_token_length: int = 4096
|
||||
model: str = ""
|
||||
runpod_id: str = ""
|
||||
|
||||
|
||||
class ClientConfig(BaseClientConfig):
|
||||
runpod_id: str = ""
|
||||
|
||||
|
||||
@register()
|
||||
class RunPodVLLMClient(ClientBase):
|
||||
client_type = "runpod_vllm"
|
||||
conversation_retries = 5
|
||||
config_cls = ClientConfig
|
||||
|
||||
class Meta(ClientBase.Meta):
|
||||
title: str = "Runpod VLLM"
|
||||
name_prefix: str = "Runpod VLLM"
|
||||
enable_api_auth: bool = True
|
||||
manual_model: bool = True
|
||||
defaults: Defaults = Defaults()
|
||||
extra_fields: dict[str, ExtraField] = {
|
||||
"runpod_id": ExtraField(
|
||||
name="runpod_id",
|
||||
type="text",
|
||||
label="Runpod ID",
|
||||
required=True,
|
||||
description="The Runpod ID to connect to.",
|
||||
)
|
||||
}
|
||||
|
||||
def __init__(self, model=None, runpod_id=None, **kwargs):
|
||||
self.model_name = model
|
||||
self.runpod_id = runpod_id
|
||||
super().__init__(**kwargs)
|
||||
|
||||
@property
|
||||
def experimental(self):
|
||||
return False
|
||||
|
||||
def set_client(self, **kwargs):
|
||||
log.debug("set_client", kwargs=kwargs, runpod_id=self.runpod_id)
|
||||
self.runpod_id = kwargs.get("runpod_id", self.runpod_id)
|
||||
|
||||
def tune_prompt_parameters(self, parameters: dict, kind: str):
|
||||
super().tune_prompt_parameters(parameters, kind)
|
||||
|
||||
keys = list(parameters.keys())
|
||||
|
||||
valid_keys = ["temperature", "top_p", "max_tokens"]
|
||||
|
||||
for key in keys:
|
||||
if key not in valid_keys:
|
||||
del parameters[key]
|
||||
|
||||
async def get_model_name(self):
|
||||
return self.model_name
|
||||
|
||||
async def generate(self, prompt: str, parameters: dict, kind: str):
|
||||
"""
|
||||
Generates text from the given prompt and parameters.
|
||||
"""
|
||||
prompt = prompt.strip()
|
||||
|
||||
self.log.debug("generate", prompt=prompt[:128] + " ...", parameters=parameters)
|
||||
|
||||
try:
|
||||
async with aiohttp.ClientSession() as session:
|
||||
endpoint = runpod.AsyncioEndpoint(self.runpod_id, session)
|
||||
|
||||
run_request = await endpoint.run(
|
||||
{
|
||||
"input": {
|
||||
"prompt": prompt,
|
||||
}
|
||||
# "parameters": parameters
|
||||
}
|
||||
)
|
||||
|
||||
while (await run_request.status()) not in [
|
||||
"COMPLETED",
|
||||
"FAILED",
|
||||
"CANCELLED",
|
||||
]:
|
||||
status = await run_request.status()
|
||||
log.debug("generate", status=status)
|
||||
await asyncio.sleep(0.1)
|
||||
|
||||
status = await run_request.status()
|
||||
|
||||
log.debug("generate", status=status)
|
||||
|
||||
response = await run_request.output()
|
||||
|
||||
log.debug("generate", response=response)
|
||||
|
||||
return response["choices"][0]["tokens"][0]
|
||||
|
||||
except Exception as e:
|
||||
self.log.error("generate error", e=e)
|
||||
emit(
|
||||
"status", message="Error during generation (check logs)", status="error"
|
||||
)
|
||||
return ""
|
||||
|
||||
def reconfigure(self, **kwargs):
|
||||
if kwargs.get("model"):
|
||||
self.model_name = kwargs["model"]
|
||||
if "runpod_id" in kwargs:
|
||||
self.api_auth = kwargs["runpod_id"]
|
||||
self.set_client(**kwargs)
|
||||
@@ -12,14 +12,6 @@
|
||||
!!! note "First start can take a while"
|
||||
The initial download and dependency installation may take several minutes, especially on slow internet connections. The console will keep you updated – just wait until the Talemate logo shows up.
|
||||
|
||||
### Optional: CUDA support
|
||||
|
||||
If you have an NVIDIA GPU and want CUDA acceleration for larger embedding models:
|
||||
|
||||
1. Close Talemate (if it is running).
|
||||
2. Double-click **`install-cuda.bat`**. This script swaps the CPU-only Torch build for the CUDA 12.8 build.
|
||||
3. Start Talemate again via **`start.bat`**.
|
||||
|
||||
## Maintenance & advanced usage
|
||||
|
||||
| Script | Purpose |
|
||||
|
||||
BIN
docs/img/0.33.0/client-lock-template-0001.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
docs/img/0.33.0/client-lock-template-0002.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
docs/img/0.33.0/client-lock-template-0003.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
docs/img/0.33.0/director-agent-chat-settings.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
docs/img/0.33.0/director-chat-0001.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
docs/img/0.33.0/director-chat-0002.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
docs/img/0.33.0/director-chat-0003.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
docs/img/0.33.0/director-chat-0004.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
docs/img/0.33.0/director-chat-confirm-off.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
docs/img/0.33.0/director-chat-confirm-on.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
docs/img/0.33.0/director-chat-expanded-function-call.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
docs/img/0.33.0/director-chat-interaction.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
docs/img/0.33.0/director-chat-mode.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/img/0.33.0/director-chat-persona-0001.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
docs/img/0.33.0/director-chat-persona-0002.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
docs/img/0.33.0/director-chat-reject-0001.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
docs/img/0.33.0/director-chat-reject-0002.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
docs/img/0.33.0/director-console-chat.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
docs/img/0.33.0/history-shared-context.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
docs/img/0.33.0/open-director-console.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
docs/img/0.33.0/restore-from-backup-dlg.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
docs/img/0.33.0/restore-from-backup.png
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
docs/img/0.33.0/share-with-world.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docs/img/0.33.0/shared-context-1.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
docs/img/0.33.0/shared-context-2.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/img/0.33.0/shared-context-3.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
docs/img/0.33.0/shared-context-new-scene.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
docs/img/0.33.0/unshare-from-world.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
docs/img/0.33.0/world-entry-shared-context.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
docs/img/0.34.0/character-card-1.png
Normal file
|
After Width: | Height: | Size: 346 KiB |
BIN
docs/img/0.34.0/character-card-2.png
Normal file
|
After Width: | Height: | Size: 702 KiB |
BIN
docs/img/0.34.0/character-card-3.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/img/0.34.0/character-card-4.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.agent_config.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.browse-templates.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.lighting-lora.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.qwen-export.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.qwen-save.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.qwen-start.png
Normal file
|
After Width: | Height: | Size: 471 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.qwen-template.png
Normal file
|
After Width: | Height: | Size: 180 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.talemate-empty-prompt.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.talemate-prompts.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.talemate-references.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
docs/img/0.34.0/comfyui.workflow.setup.talemate-resulotion.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
docs/img/0.34.0/shared-world-1.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
docs/img/0.34.0/shared-world-10.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
docs/img/0.34.0/shared-world-11.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
docs/img/0.34.0/shared-world-12.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
docs/img/0.34.0/shared-world-13.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
docs/img/0.34.0/shared-world-14.png
Normal file
|
After Width: | Height: | Size: 411 KiB |
BIN
docs/img/0.34.0/shared-world-2.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
docs/img/0.34.0/shared-world-3.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
docs/img/0.34.0/shared-world-4.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
docs/img/0.34.0/shared-world-5.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
docs/img/0.34.0/shared-world-6.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
docs/img/0.34.0/shared-world-7.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
docs/img/0.34.0/shared-world-8.png
Normal file
|
After Width: | Height: | Size: 371 KiB |
BIN
docs/img/0.34.0/shared-world-9.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
docs/img/0.34.0/visual-agent-a1111-1.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
docs/img/0.34.0/visual-agent-a1111-2.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
docs/img/0.34.0/visual-agent-a1111-3.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
docs/img/0.34.0/visual-agent-comfyui-1.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
docs/img/0.34.0/visual-agent-comfyui-2.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
docs/img/0.34.0/visual-agent-comfyui-3.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/img/0.34.0/visual-agent-comfyui-4.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
docs/img/0.34.0/visual-agent-comfyui-5.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
docs/img/0.34.0/visual-agent-general-1.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
docs/img/0.34.0/visual-agent-general-2.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/img/0.34.0/visual-agent-general-3.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
docs/img/0.34.0/visual-agent-google-4.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
docs/img/0.34.0/visual-agent-google-5.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
docs/img/0.34.0/visual-agent-google-6.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
docs/img/0.34.0/visual-agent-google-7.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
docs/img/0.34.0/visual-agent-google-8.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
docs/img/0.34.0/visual-agent-openai-1.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
docs/img/0.34.0/visual-agent-openai-2.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
docs/img/0.34.0/visual-agent-openai-3.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
docs/img/0.34.0/visual-agent-openai-4.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
docs/img/0.34.0/visual-agent-openai-5.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
docs/img/0.34.0/visual-agent-openrouter-1.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
docs/img/0.34.0/visual-agent-openrouter-2.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
docs/img/0.34.0/visual-agent-openrouter-3.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
docs/img/0.34.0/visual-agent-openrouter-4.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
docs/img/0.34.0/visual-agent-openrouter-5.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
docs/img/0.34.0/visual-agent-sdnext-1.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
docs/img/0.34.0/visual-agent-sdnext-2.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
docs/img/0.34.0/visual-agent-sdnext-3.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/img/0.34.0/visual-agent-sdnext-4.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
docs/img/0.34.0/visual-agent-sdnext-5.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/img/0.34.0/visual-agent-sdnext-6.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
docs/img/0.34.0/visual-library-0.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
docs/img/0.34.0/visual-library-1.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
docs/img/0.34.0/visual-library-10.png
Normal file
|
After Width: | Height: | Size: 20 KiB |