MCPcopy Create free account
hub / github.com/ScienciaLAB/document-qa / __init__

Method __init__

document_qa/ner_client_generic.py:34–47  ·  view source on GitHub ↗

Initialise client. Args: base_url (str): The base URL to the service being used. username (str): The username to authenticate with. api_key (str): The API key to authenticate with. timeout (int): Maximum time before timing out.

(self, base_url, username=None, api_key=None, status_endpoint=None, timeout=60)

Source from the content-addressed store, hash-verified

32 api_base = None
33
34 def __init__(self, base_url, username=None, api_key=None, status_endpoint=None, timeout=60):
35 """Initialise client.
36
37 Args:
38 base_url (str): The base URL to the service being used.
39 username (str): The username to authenticate with.
40 api_key (str): The API key to authenticate with.
41 timeout (int): Maximum time before timing out.
42 """
43 self.base_url = base_url
44 self.username = username
45 self.api_key = api_key
46 self.status_endpoint = urljoin(self.base_url, status_endpoint)
47 self.timeout = timeout
48
49 @staticmethod
50 def encode(request, data):

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected