@uservane/openai-agents/server: runWithFeedback
Function: runWithFeedback()
Section titled “Function: 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 idconst { 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 })Parameters
Section titled “Parameters”unknown
unknown
options
Section titled “options”Returns
Section titled “Returns”Promise<RunWithFeedbackResult<AgentsRunResultLike>>