Skip to content

@uservane/openai-agents/server: runWithFeedback

runWithFeedback(agent, input, options): Promise<RunWithFeedbackResult<AgentsRunResultLike>>

Defined in: @[email protected]_@[email protected]_ws@[email protected]__react@19.2.3/node_modules/@uservane/openai-agents/dist/server.d.ts:143

Run an OpenAI Agents agent and mint feedback exactly once on true resolution.

import { runWithFeedback } from "@uservane/openai-agents/server";
import { Agent, Runner } from "@openai/agents";
const groupId = sessionId; // your chat session id
const { finalOutput, feedback } = await runWithFeedback(agent, input, {
secretKey: process.env.USERVANE_SECRET_KEY!,
respondentId: userId,
surveyId: "surv_post_task",
groupId,
runner: new Runner({ groupId }),
});
// thread feedback to the client -> controller.bind({ surveyId, showToken, sessionId })

unknown

unknown

RunWithFeedbackOptions

Promise<RunWithFeedbackResult<AgentsRunResultLike>>