adaptive_sdk.rest

This file serves the purpose of automatic SDK docs generation. All output rest types are included in __all__ so they are exported to the reference docs.

class AddInteractionsResponse(adaptive_sdk.rest.base_model.BaseModel):

completion_id: uuid.UUID
session_id: uuid.UUID
feedback_ids: List[uuid.UUID]
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ChatResponse(adaptive_sdk.rest.base_model.BaseModel):

id: str
created: typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Unix Timestamp in seconds', examples=['1720712536'])]
choices: List[ChatChoice]
session_id: uuid.UUID
usage: Usage
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ChatChoice(adaptive_sdk.rest.base_model.BaseModel):

index: typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0)])]
finish_reason: Optional[str]
completion_id: str
model: str
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ChatChoiceMessage(adaptive_sdk.rest.base_model.BaseModel):

id: str
role: str
content: str
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ChatResponseChunk(adaptive_sdk.rest.base_model.BaseModel):

id: str
choices: List[Delta]
created: typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Unix Timestamp in seconds', examples=['1720712536'])]
session_id: uuid.UUID
usage: Optional[Usage]
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ComparisonOutput(adaptive_sdk.rest.base_model.BaseModel):

comparison_id: uuid.UUID
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class Delta(adaptive_sdk.rest.base_model.BaseModel):

index: typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0)])]
completion_id: str
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class EmbeddingResponse(adaptive_sdk.rest.base_model.BaseModel):

index: typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0)])]
embedding: Union[List[float], str]
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class EmbeddingsResponseList(adaptive_sdk.rest.base_model.BaseModel):

data: List[EmbeddingResponse]
usage: Optional[Usage]
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class FeedbackOutput(adaptive_sdk.rest.base_model.BaseModel):

feedback_id: uuid.UUID
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class GenerateChoice(adaptive_sdk.rest.base_model.BaseModel):

index: typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0)])]
text: str
completion_id: str
model: str
finish_reason: Optional[str]
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class GenerateResponse(adaptive_sdk.rest.base_model.BaseModel):

id: str
created: typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Unix Timestamp in seconds', examples=['1720712536'])]
choices: List[GenerateChoice]
usage: Usage
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class Usage(adaptive_sdk.rest.base_model.BaseModel):

completion_tokens: typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0)])]
prompt_tokens: typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0)])]
total_tokens: typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0)])]
model_config = {'populate_by_name': True, 'validate_assignment': True, 'arbitrary_types_allowed': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].