The official Python library for the teraflopai API
Project description
Teraflop AI Python API library
Installation
# install from PyPI
pip install teraflopai
Usage
export TERAFLOPAI_API_KEY="your_api_key_here"
Search Engine API
import os
from teraflopai import TeraflopAI
api_key = os.environ.get("TERAFLOPAI_API_KEY")
url = "https://api.caselaw.teraflopai.com/v1/search/free"
client = TeraflopAI(api_key=api_key, url=url)
results = client.search("City of Houma")
print(results["results"][0])
Beta functionality only available upon request
OpenAI compatible API
import os
from openai import OpenAI
client = OpenAI(
base_url="",
api_key=os.environ.get("TERAFLOPAI_API_KEY"),
)
response = client.embeddings.create(
input=[
"Your text string goes here",
"Another text string",
],
model=""
)
print(response)
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
teraflopai-0.1.11.tar.gz
(6.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file teraflopai-0.1.11.tar.gz.
File metadata
- Download URL: teraflopai-0.1.11.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e647b77601701451efdc49147acba4592f71017ff35dc3c49e64136da5b80baf
|
|
| MD5 |
ee9689a228aab27a64bab0c89d031a3c
|
|
| BLAKE2b-256 |
42ddc8277d7f3e8e3dc7eabb61b8a47a0aa9e1c5695afd2fd54d2719c17df5fe
|
File details
Details for the file teraflopai-0.1.11-py3-none-any.whl.
File metadata
- Download URL: teraflopai-0.1.11-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9c131fb8257be58fa68fd3da405732eba7a315e2f2cd6baa93bc17f7ae6bb39
|
|
| MD5 |
ee6b1dd6c19e44e7d225af788bd84cdf
|
|
| BLAKE2b-256 |
c8e3f7c8ef2f353d8190f31a856474e78bf0eeb50e5928a501c67a17b669a49e
|