citrine.informatics.catalyst.assistant module

class citrine.informatics.catalyst.assistant.AssistantRequest(*, question: str, predictor: GraphPredictor, temperature: float | None = 0.0, language_model: LanguageModelChoice | None = LanguageModelChoice.GPT_4)

Bases: Serializable[AssistantRequest]

A query to the model assistant.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

language_model = 'gpt-4'
predictor = None
question = None
temperature = 0.0
class citrine.informatics.catalyst.assistant.AssistantResponse

Bases: PolymorphicSerializable[AssistantResponse]

The parent type for all Model Assistant responses.

classmethod build(data: dict) SelfType

Build the underlying type.

classmethod get_type(data) Type[AssistantResponse]

Return the subtype.

class citrine.informatics.catalyst.assistant.AssistantResponseConfig

Bases: Serializable[AssistantResponseConfig], AssistantResponse

A successful model assistant invocation, whose response includes a modified predictor.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[AssistantResponse]

Return the subtype.

predictor = None
class citrine.informatics.catalyst.assistant.AssistantResponseExecError

Bases: Serializable[AssistantResponseExecError], AssistantResponse

A failed model assistant invocation, due to some internal issue.

This most likely indicates the assistant got some unexpected output when asking its query. It indicates an internal error, not a problem with the client invocation.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[AssistantResponse]

Return the subtype.

error = None
class citrine.informatics.catalyst.assistant.AssistantResponseInputError

Bases: Serializable[AssistantResponseInputError], AssistantResponse

A single input failure.

Contains the error message, and the field it applies to.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[AssistantResponse]

Return the subtype.

error = None
field = None
class citrine.informatics.catalyst.assistant.AssistantResponseInputErrors

Bases: Serializable[AssistantResponseInputErrors], AssistantResponse

A failed model assistant invocation, due to malformed input.

This should only happen if there’s some field omitted by the client, or one of its values is outside acceptable ranges.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[AssistantResponse]

Return the subtype.

errors = None
class citrine.informatics.catalyst.assistant.AssistantResponseMessage

Bases: Serializable[AssistantResponseMessage], AssistantResponse

A successful model assistant invocation, whose response is only text.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[AssistantResponse]

Return the subtype.

message = None
class citrine.informatics.catalyst.assistant.AssistantResponseUnsupported

Bases: Serializable[AssistantResponseUnsupported], AssistantResponse

A successful model assistant invocation, but for an unsupported query.

This will cover any user query which the model assistant could not map to a functionality it supports. For example, asking a generic question, or something unrelated to materials.

classmethod build(data: dict) Self

Build an instance of this object from given data.

dump() dict

Dump this instance.

classmethod get_type(data) Type[AssistantResponse]

Return the subtype.

message = None