genai.request.feedback.feedback_service module#

class genai.request.feedback.feedback_service.FeedbackService[source]#

Bases: BaseService[BaseServiceConfig, BaseServiceServices]

create(request_id, *, categories=None, comment=None, contact_consent=None, vote=None)[source]#

Provide feedback on the request.

Parameters:
  • request_id (str) – A string representing the ID of the request.

  • categories (list[str | RequestFeedbackCategory] | None) – An optional list of enum-like objects representing the feedback categories.

  • comment (str | None) – An optional string representing the feedback comment.

  • contact_consent (bool | None) – Can we contact you for more information?

  • vote (str | RequestFeedbackVote | None) – Either ‘up’ or ‘down’.

Raises:
Return type:

RequestIdFeedbackCreateResponse

retrieve(request_id)[source]#

Retrieve feedback for the request.

Raises:
Parameters:

request_id (str) –

Return type:

RequestIdFeedbackRetrieveResponse

update(request_id, *, categories=None, comment=None, contact_consent=None, vote=None)[source]#

Update existing feedback.

Parameters:
  • request_id (str) – The ID of the request to update.

  • categories (list[RequestFeedbackCategory] | None) – Optional. List of request feedback categories.

  • comment (str | None) – Optional. Comment for the request feedback.

  • contact_consent (bool | None) – Can we contact you for more information?

  • vote (str | RequestFeedbackVote | None) – Either ‘up’ or ‘down’.

Raises:
Return type:

RequestIdFeedbackUpdateResponse