Galileo
Search
K

Utils

Submodules

llm_monitor.utils.aggregator module

client*: ApiClient*

initialize_api_client(project_name)

  • Return type: None

add_record_to_batch(record)

  • Return type: None

class AggregatorJob(execute, *args, **kwargs)

Bases: Thread
This constructor should always be called with keyword arguments. Arguments are:
group should be None; reserved for future extension when a ThreadGroup class is implemented.
target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.
name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.
args is a list or tuple of arguments for the target invocation. Defaults to ().
kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.
If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread._init_()) before doing anything else to the thread.

stop()

  • Return type: None

run()

Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
  • Return type: None

aggregator_job*: AggregatorJob*

start_aggregator_job()

  • Return type: None

llm_monitor.utils.api_client module

class ApiClient(project_name)

Bases: object

get_api_url()

  • Return type: str

get_token()

  • Return type: str

healthcheck()

  • Return type: bool

username_login(username, password)

  • Return type: Dict[str, str]

property base_url*: str*

property auth_header*: Dict[str, str]*

ingest_batch(transaction_batch)

  • Return type: Dict[str, str]

get_project_id_by_name(project_name)

  • Return type: UUID

llm_monitor.utils.logger module

llm_monitor.utils.request module

make_request(request_method, base_url, endpoint, body=None, data=None, files=None, params=None, headers=None, timeout=None)

  • Return type: Any

class HttpHeaders(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: str, Enum

accept = 'accept'

content_type = 'Content-Type'

application_json = 'application/json'

static accept_json()

  • Return type: Dict[str, str]

static content_type_json()

  • Return type: Dict[str, str]

static json()

  • Return type: Dict[str, str]

Module contents