Assistant
The Assistant is the conversational interface to the Diafunc platform. You describe what you want in plain language and the assistant answers, working against your project's data, entities, and analyses on your behalf. It can read project content, run functions, and explain results, so a conversation can carry a task from a question all the way to a finished table or model without you leaving the chat.
Every conversation runs in the context of a project and is subject to the same permissions as the rest of the platform: the assistant can only touch what your account and token are allowed to touch.
Where to use it
The chat page — open the assistant at /chat for a standalone conversation, or at /chat/<projectId>/<projectBranch> to scope the conversation to a specific project and branch. A sidebar lists your past sessions so you can pick up where you left off.
In the Lab — every project's Lab has a built-in Chat tab. The assistant already knows which project and branch you are in, so questions land directly against the data and entities in front of you. From the automatic-analysis views you can also send a chapter or result straight into the chat as a grounded prompt.
Ask About It on an analysis — after an analysis runs, the Ask About It button opens a chat session scoped to that analysis, with the findings already in context. Follow-up questions land against the specific results of your run rather than the project in general.
Sessions
Each conversation is a session with its own message history. A new session starts the moment you send your first message; from then on the assistant remembers the earlier turns in that session.
You can list your sessions, rename a session to something memorable, show its full message history, and delete sessions you no longer need. On the chat page these controls live in the session sidebar; from the command line and the API they are available as explicit commands and endpoints.
Streaming
Answers are streamed: the response appears token-by-token as it is generated rather than arriving all at once. The chat surfaces render this incrementally, and the command line and API expose it as a server-sent-events stream so you can consume the reply as it is produced. A blocking mode that returns the complete answer in one response is also available when streaming is not needed.
Uploading data and context
In a project-scoped conversation you can attach a file — pick it with the paperclip button or drag it onto the input box. CSV and Excel files (
.csv, .xlsx, .xls) are imported as a new Table entity in the project, and the reply links straight to it so both you and the assistant can work with the data in later turns. Voice mode
The microphone button in the chat input starts a hands-free voice conversation: speak your question, the assistant transcribes it and sends it, the reply is read out loud as it streams in, and listening resumes automatically when the answer finishes. Press the button again to stop voice mode at any time, and grant microphone access in your browser when asked.
Speech processing happens on your device: both speech recognition and speech synthesis run as compact models inside your browser (using GPU acceleration where the browser supports it), so your audio is never uploaded — only the transcribed text of your message is sent to the assistant, exactly as if you had typed it. The models are downloaded once on first use, with a progress indicator while they load. Transcription currently understands English.
Usage and credit metering
The assistant is metered by token usage. Every message consumes input tokens for the prompt and context the assistant reads, and output tokens for the reply it generates. Input tokens are billed at 0.01667 credits per 1,000 tokens and output tokens at 0.06667 credits per 1,000 tokens, so longer conversations and larger attached context cost more.
You can inspect how many tokens a conversation used at any time — the streaming and blocking responses report the input and output token counts for each turn, and a dedicated usage view aggregates your consumption. See Credits for how credits are priced and replenished.
From the command line
The diafunc CLI exposes the assistant under the chat command group. Send a single message, stream a reply, upload context, manage sessions, and check your token usage — or run diafunc chat with no subcommand for an interactive REPL.
Using the assistant from the CLI