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.1.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.1.tar.gz.
File metadata
- Download URL: teraflopai-0.1.1.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 |
f521be50d0af092846b4bcd6b67d6ffc5d01e502ba50faebc93395874e35e67c
|
|
| MD5 |
3dc66c624fb465eb4dd9583c660956bf
|
|
| BLAKE2b-256 |
eb4c7d5182b340f181cf881d23fba99e0b97e92a8df6f1dee95db9b1e1995f79
|
File details
Details for the file teraflopai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: teraflopai-0.1.1-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 |
88cf6ebcb454daf96e15f9b74139712576d1b53eb16745aa6a3100cc1a0accf8
|
|
| MD5 |
3570ff796bbbb7ff390e924e182451db
|
|
| BLAKE2b-256 |
4aabf4b6527874cd9f82de13048c43f224210bb922cabb5ced9b8d7f643d1b75
|