(feedback)
- create - Submit feedback
Submit feedback for the LLM transaction via the API
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| 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. |
models.CreateFeedbackResponseBody
| Error Type | Status Code | Content Type |
|---|---|---|
| models.APIError | 4XX, 5XX | */* |