> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Feedback SDK Reference

> SDK reference for the Feedback API, available in Node.js and Python.

## Feedback

### Remove a Feedback Evaluation

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      orq.feedback.remove_evaluation()

      # Use the SDK ...

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    await orq.feedback.removeEvaluation();

  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,  # required
        "trace_id": str,  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;  // required
      traceId: string;  // required
    }
    ```
  </CodeGroup>
</Expandable>

### Create a Feedback Evaluation

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      orq.feedback.create_evaluation()

      # Use the SDK ...

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    await orq.feedback.createEvaluation();

  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,  # required
        "evaluation_type": Literal["human_review"],  # required
        "human_review_id": Optional[str],
        "source": Optional[Literal["orq", "external"]],
        "explanation": Optional[str],
        "~~`reviewed_at`~~": date,
        "type": Literal["string"],  # required
        "value": str,  # required
        "trace_id": str,  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;  // required
      evaluation_type: "human_review";  // required
      human_review_id?: string | undefined;
      source?: "orq" | "external" | undefined;
      explanation?: string | undefined;
      ~~`reviewed_at`~~?: date;
      type: "string";  // required
      value: string;  // required
      trace_id: string;  // required
    }
    ```
  </CodeGroup>
</Expandable>

### Remove Feedback

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      res = orq.feedback.remove()

      # Handle response
      print(res)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    const result = await orq.feedback.remove();

    console.log(result);
  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,  # required
        "trace_id": str,  # required
        "product": Literal["remoteconfigs", "deployments", "experiments", "playgrounds", "spreadsheets", "spreadsheet_run", "llm_evaluator", "knowledge", "router", "workflows", "external_events", "agents", "memory-stores", "generic", "evaluators", "otel", "ai-chat"],  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;  // required
      traceId: string;  // required
      product: string;  // required
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,
        "trace_id": str,
        "product": Literal["remoteconfigs", "deployments", "experiments", "playgrounds", "spreadsheets", "spreadsheet_run", "llm_evaluator", "knowledge", "router", "workflows", "external_events", "agents", "memory-stores", "generic", "evaluators", "otel", "ai-chat"],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;
      traceId: string;
      product: string;
    }
    ```
  </CodeGroup>
</Expandable>

### Create Feedback

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      res = orq.feedback.create()

      # Handle response
      print(res)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    const result = await orq.feedback.create();

    console.log(result);
  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": Optional[str],
        "field": str,  # required
        "value": Union[str, float, List[str]],  # required
        "trace_id": str,  # required
        "product": Optional[Literal["remoteconfigs", "deployments", "experiments", "playgrounds", "spreadsheets", "spreadsheet_run", "llm_evaluator", "knowledge", "router", "workflows", "external_events", "agents", "memory-stores", "generic", "evaluators", "otel", "ai-chat"]],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id?: string;
      field: string;  // required
      value: string | number | string[];  // required
      traceId: string;  // required
      product?: string;
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": Optional[str],
        "property": str,
        "value": Union[str, float, List[str]],
        "trace_id": str,
        "product": Optional[Literal["remoteconfigs", "deployments", "experiments", "playgrounds", "spreadsheets", "spreadsheet_run", "llm_evaluator", "knowledge", "router", "workflows", "external_events", "agents", "memory-stores", "generic", "evaluators", "otel", "ai-chat"]],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id?: string;
      property: string;
      value: string | number | string[];
      traceId: string;
      product?: string;
    }
    ```
  </CodeGroup>
</Expandable>
