DRF Serializers

LLMClient serializers.

class smarter.apps.llm_client.serializers.LLMClientAPIKeySerializer(*args, **kwargs)[source]

Bases: SmarterCamelCaseSerializer

get_fields()[source]

Return the dict of field names -> field instances that should be used for self.fields when instantiating the serializer.

class smarter.apps.llm_client.serializers.LLMClientConfigSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Serializer for the smarter.apps.prompt.views.PromptConfigView.

which should not be camelCased.

get_default_system_role(obj)[source]
get_fields()[source]

Return the dict of field names -> field instances that should be used for self.fields when instantiating the serializer.

class smarter.apps.llm_client.serializers.LLMClientCustomDomainSerializer(*args, **kwargs)[source]

Bases: MetaDataWithOwnershipModelSerializer

get_fields()[source]

Return the dict of field names -> field instances that should be used for self.fields when instantiating the serializer.

class smarter.apps.llm_client.serializers.LLMClientFunctionsSerializer(*args, **kwargs)[source]

Bases: SmarterCamelCaseSerializer

get_fields()[source]

Return the dict of field names -> field instances that should be used for self.fields when instantiating the serializer.

class smarter.apps.llm_client.serializers.LLMClientPluginSerializer(*args, **kwargs)[source]

Bases: SmarterCamelCaseSerializer

get_fields()[source]

Return the dict of field names -> field instances that should be used for self.fields when instantiating the serializer.

class smarter.apps.llm_client.serializers.LLMClientRequestsSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

Serializer for the LLMClientRequests model.

class smarter.apps.llm_client.serializers.LLMClientSerializer(*args, **kwargs)[source]

Bases: MetaDataWithOwnershipModelSerializer

get_api_keys(obj)[source]
get_base_api_domain(obj)[source]
get_base_default_host(obj)[source]
get_custom_domains(obj)[source]
get_custom_host(obj)[source]
get_custom_url(obj)[source]
get_default_host(obj)[source]
get_default_system_role(obj)[source]
get_default_url(obj)[source]
get_fields()[source]

Return the dict of field names -> field instances that should be used for self.fields when instantiating the serializer.

get_functions(obj)[source]
get_hashed_id(obj)[source]
get_hostname(obj)[source]
get_is_authentication_required(obj)[source]
get_manifest_url(obj)[source]
get_plugins(obj)[source]
get_ready(obj)[source]
get_rfc1034_compliant_name(obj)[source]
get_sandbox_host(obj)[source]
get_sandbox_url(obj)[source]
get_url(obj)[source]
get_url_chat_config(obj)[source]
get_url_chatapp(obj)[source]
get_url_llm_client(obj)[source]