Resources

class giskard_hub.resources.ConversationsResource(client: SyncClient)[source]

Bases: APIResource

create(*, dataset_id: str, messages: List[ChatMessage], rules: List[str] = NOT_GIVEN, tags: List[str] = NOT_GIVEN, expected_output: str | None = NOT_GIVEN, demo_output: ChatMessage | None = NOT_GIVEN)[source]
delete(conversation_id: str | List[str]) None[source]
list(dataset_id: str) List[Conversation][source]
retrieve(conversation_id: str)[source]
update(conversation_id: str, *, dataset_id: str = NOT_GIVEN, messages: List[ChatMessage] = NOT_GIVEN, rules: List[str] = NOT_GIVEN, tags: List[str] = NOT_GIVEN, expected_output: str | None = NOT_GIVEN, demo_output: ChatMessage | None = NOT_GIVEN) Conversation[source]
class giskard_hub.resources.DatasetsResource(client: SyncClient)[source]

Bases: APIResource

create(*, name: str, description: str, project_id: str) Dataset[source]
delete(dataset_id: str | List[str]) None[source]
list(project_id: str) List[Dataset][source]
retrieve(dataset_id: str)[source]
update(dataset_id: str, *, name: str = NOT_GIVEN, description: str = NOT_GIVEN, project_id: str = NOT_GIVEN) Dataset[source]
class giskard_hub.resources.EvaluationsResource(client: SyncClient)[source]

Bases: APIResource

create(*, model_id: str, dataset_id: str, tags: List[str] = NOT_GIVEN, name: str = NOT_GIVEN)[source]
create_local(*, model: Model, dataset_id: str, tags: List[str] = NOT_GIVEN, name: str = NOT_GIVEN)[source]
delete(execution_id: str | List[str])[source]
list(project_id: str)[source]
list_entries(run_id: str)[source]
retrieve(run_id: str)[source]
update_entry(run_id: str, entry_id: str, *, model_output: ModelOutput = NOT_GIVEN, results: List[EvaluatorResult] = NOT_GIVEN)[source]
class giskard_hub.resources.ModelsResource(client: SyncClient)[source]

Bases: APIResource

chat(model_id: str, messages: List[ChatMessage]) ModelOutput[source]
create(*, name: str, description: str, url: str, supported_languages: List[str], headers: Dict[str, str] | None = None, project_id: str) Model[source]
delete(model_id: str | List[str]) None[source]
list(project_id: str) List[Model][source]
retrieve(model_id: str) Model[source]
update(model_id: str, *, name: str = NOT_GIVEN, description: str = NOT_GIVEN, url: str = NOT_GIVEN, supported_languages: List[str] = NOT_GIVEN, headers: Dict[str, str] = NOT_GIVEN, project_id: str = NOT_GIVEN) Model[source]
class giskard_hub.resources.ProjectsResource(client: SyncClient)[source]

Bases: APIResource

create(*, name: str, description: str = '')[source]
delete(project_id: str | List[str])[source]
list()[source]
retrieve(project_id: str)[source]
update(project_id: str, *, name: str = NOT_GIVEN, description: str = NOT_GIVEN)[source]