Skip to main content

Python SDK for Tensorfuse

Project description

Tensorfuse SDK

Python SDK package for Tensorfuse

Installation

Install the package using the command pip install -i https://test.pypi.org/simple/ tensorfuse

Usage

Default Logging:

from tensorfuse.tensorfuse import log_generic_event

status = log_generic_event(
    token=<AUTH_TOKEN>,
    log=<LOG_OBJECT>
)

Logging Using IDs:

from tensorfuse.tensorfuse import log_generic_event_using_ids

status = log_generic_event_using_ids(
    token=<AUTH_TOKEN>,
    teamId=<TEAM_ID>, 
    projectId=<PROJECT_ID>, 
    datasourceId=<DATASOURCE_ID>,  
    log=<LOG_OBJECT>
)

Logging Using Names:

from tensorfuse.tensorfuse import log_generic_event_using_names

status = log_generic_event_using_names(
    token=<AUTH_TOKEN>,
    teamName=<TEAM_NAME>, 
    projectName=<PROJECT_NAME>, 
    datasourceName=<DATASOURCE_NAME>,  
    log=<LOG_OBJECT>
)

The Log Object:

log_obj = {
    "query": "<INPUT QUERY>",
    "response1": "<LLM 1 OUTPUT>",
    "response2": "<LLM 2 OUTPUT>",
    "human": "<HUMAN RATING>"
}

Changing the Base Url

You can also change the BASE_URL used for the API call

By default:

BASE_URL = "https://api.tensorfuse.io/"

To change, add the argument baseUrl in the function you use.

Example:

status = log_generic_event_using_names(
    token=<AUTH_TOKEN>,
    teamName=<TEAM_NAME>, 
    projectName=<PROJECT_NAME>, 
    datasourceName=<DATASOURCE_NAME>,  
    log=<LOG_OBJECT>,
    baseUrl="https://localhost:8000/"
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tensorfuse_python-0.0.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tensorfuse_python-0.0.5-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file tensorfuse_python-0.0.5.tar.gz.

File metadata

  • Download URL: tensorfuse_python-0.0.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for tensorfuse_python-0.0.5.tar.gz
Algorithm Hash digest
SHA256 18b147dbeac1fbeb91985564bdb0e923a597c84b49a59d14eca67a41f19dc07b
MD5 eec94ee4681318e7118beb58aecddf93
BLAKE2b-256 203131bcc5b254b2992490dd34ef598208970d7b2b1b7f8e2ed25b6bb4652be3

See more details on using hashes here.

File details

Details for the file tensorfuse_python-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for tensorfuse_python-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3dd36e45b76e45fef05db664e88fa3f45236de8478493ec9a006084b529610f6
MD5 b85e79d09c1806e5577e6dc7873dc886
BLAKE2b-256 d4fe8fe30219a8aee734564bfb40ce40474ec4232902108c5dd4d550b176979a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page