MCPcopy Create free account
hub / github.com/Ironclad/rivet-example / runMessageGraph

Function runMessageGraph

server/src/services/RivetRunner.ts:15–24  ·  view source on GitHub ↗
(input: { type: 'assistant' | 'user'; message: string }[])

Source from the content-addressed store, hash-verified

13import { calculateExpression } from './CalculationService.js';
14
15export async function runMessageGraph(input: { type: 'assistant' | 'user'; message: string }[]): Promise<string> {
16 const outputs = await runRivetGraph('5BI0Pfuu2naOUKqGUO-yZ' as GraphId, {
17 messages: {
18 type: 'object[]',
19 value: input,
20 },
21 });
22
23 return coerceType(outputs.output, 'string');
24}
25
26export async function runRivetGraph(graphId: GraphId, inputs?: GraphInputs): Promise<GraphOutputs> {
27 const project = currentDebuggerState.uploadedProject ?? await loadProjectFromFile('../chat.rivet-project');

Callers 1

Router.tsFile · 0.85

Calls 1

runRivetGraphFunction · 0.85

Tested by

no test coverage detected