Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ routing; its run progress is one step per unit (see `resolve_total_steps`).
are the capture→train→own loop as a UI. Auth has three modes — `password`,
`apikey`, or `none` (`GET /v1/auth` reports which) — plus long-lived, hashed,
individually-revocable **machine tokens** that workers authenticate with.
The UI uses the opencontroller console's design system (shadcn primitives in
`frontend/src/components/ui/`, tokens in `index.css`, light + dark) and can
run **embedded** in a host console over the `oc-embed/1` postMessage bridge
(`frontend/src/lib/embed.ts`): framed by an origin `serve.py`'s
`frame_ancestors()` lists, it drops its shell, follows the host's theme, and
sends every call to the host's proxy with the host's pass.

### The shadow accelerator (`accel.py`)

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ charts + training console) → Playground (compare base ↔ finetuned). It's the
built React app, shipped in the wheel; the same JSON protocol powers
`backend="remote"`.

The studio can also be **embedded** in a host console such as opencontroller,
in a frame, over the `oc-embed/1` bridge (the same one Rekori's console
speaks): the host's menu replaces the sidebar, the host sets the theme, and
every API call goes through the host's proxy with a short-lived pass — the
frame holds no session of its own. Only listed origins may frame it:
`https://dev.opencontroller.sh` and `localhost` on any port are built in; add
yours with `SHADOWLM_FRAME_ANCESTORS="https://console.example.com"`
(space- or comma-separated). Opened on its own, the studio is unchanged.

## The shadow accelerator

`accelerator="shadow"` turns on the optimizations that are safe for your model
Expand Down
17 changes: 17 additions & 0 deletions dev.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from lyzr import Studio

# Initialize the SDK
studio = Studio(api_key="your-api-key")

# Create an agent
agent = studio.create_agent(
name="My Assistant",
provider="gpt-4o",
role="Helpful assistant",
goal="Help users with their questions",
instructions="Be concise and accurate"
)

# Run the agent
response = agent.run("What is machine learning?")
print(response.response)
8 changes: 7 additions & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ShadowLM · slm♥</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Sora:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap"
/>
<title>openfinetuner</title>
</head>
<body>
<div id="root"></div>
Expand Down
Loading
Loading