Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 4.35 KB

File metadata and controls

50 lines (34 loc) · 4.35 KB

Feedback

(feedback)

Overview

Available Operations

create

Submit feedback for the LLM transaction via the API

Example Usage

from orq_poc_python_multi_env_version import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as s:
    res = s.feedback.create(field="rating", value=[
        "good",
    ], trace_id="67HTZ65Z9W91HSF51CW68KK1QH")

    if res is not None:
        # handle response
        pass

Parameters

Parameter Type Required Description
field str ✔️ A string describing the specific property or aspect rated.
value models.Value ✔️ The feedback value. For single selection of multiple choice, the value should be an array of strings. For correction, the value should be a string.
trace_id str ✔️ The id returned by the get_config or invoke endpoints
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.CreateFeedbackResponseBody

Errors

Error Type Status Code Content Type
models.APIError 4XX, 5XX */*