ynlu.sdk package

Subpackages

Submodules

ynlu.sdk.client module

class ynlu.sdk.client.NLUClient(token: str, expected_retries: int = 1, url: str = 'https://ynlu.yoctol.com/graphql')[source]

Bases: object

Client which could contain multiple intent clfs NOTE: Only support predicting for now

URL = 'https://ynlu.yoctol.com/graphql'
build_client(retries: int)[source]
check_clf_id(classifier_id: str) → None[source]
check_clf_name(classifier_name: str) → None[source]
fetch_all_available_clf_ids_and_names() → List[str][source]
get_all_available_clf_ids() → List[str][source]
get_all_available_clf_names() → List[str][source]
get_model_by_id(classifier_id: str) → ynlu.sdk.model.Model[source]
get_model_by_name(classifier_name: str) → ynlu.sdk.model.Model[source]

ynlu.sdk.exceptions module

exception ynlu.sdk.exceptions.BaseYNLUSDKException[source]

Bases: ynlu.exceptions.BaseYNLUException

ynlu.sdk.model module

class ynlu.sdk.model.Model(classifier_id: str, client: gql.client.Client)[source]

Bases: object

batch_predict(utterances: List[str]) → Tuple[List[List[Dict]], List[List[Dict]]][source]
model_id
predict(utterance: str, exactly: bool = True) → Tuple[List[Dict], List[Dict]][source]
train()[source]

Module contents