Catalog PyPI
PACKAGE EXPLORERView in registry

abyss-ai-sdk

PyPI

Multi-provider AI utility with structured responses and streaming

Versions collected1
Direct dependencies4From release 0.2.3
Last observed20 Oct, 17:48 UTC

README

Version 0.2.3 documentation

abyss-ai-sdk (Python)

Multi-provider AI utility with structured responses and streaming. Supports Groq, OpenAI, and Anthropic with a unified API.

Install

pip install abyss-ai-sdk

Usage

from abyss_ai_sdk import create_client, AskOptions
from pydantic import BaseModel

ai = create_client(provider="groq/openai/anthropic", api_key="your_api_key")

# Plain text
res = ai.ask(AskOptions(prompt="Say hello in one sentence."))
print(res.data)

# Structured
class Sentiment(BaseModel):
  sentiment: str
  confidence: float
  summary: str

res = ai.ask(AskOptions(
  prompt="Analyse: 'I love this product!'",
  schema=Sentiment,
))
print(res.data.sentiment)
print(res.data.confidence)

# Streaming
for chunk in ai.stream(AskOptions(prompt="Tell me a story.")):
  print(chunk, end="", flush=True)

Embeddings (OpenAI only)

from abyss_ai_sdk import create_client, EmbedOptions

ai = create_client(provider="openai", api_key="your_openai_key")

res = ai.embed(EmbedOptions(input=["cat", "dog"]))
print(len(res.embeddings[0]))  # 1536

One-off calls

from abyss_ai_sdk import ask, stream, AskOptions
from abyss_ai_sdk import AbyssConfig

config = AbyssConfig(provider="groq", api_key="your_groq_key")

res = ask(config, AskOptions(prompt="What is 2 + 2?"))
print(res.data)

Providers

Providers

ProviderDefault Model
groqllama-3.1-8b-instant
openaigpt-4o-mini
anthropicclaude-sonnet-4-6

Override the model:

ai = create_client(provider="groq/openai/anthropic", api_key="api_key", model="model_of_your_choice")

API

create_client(provider, api_key, model=None)

Returns an AbyssClient with .ask(), .stream(), and .embed().

AskOptions

FieldTypeDescription
promptstrThe user message
systemstr | NoneSystem prompt
schemaBaseModel | NonePydantic model for structured output
temperaturefloatDefault 0.7
max_tokensintDefault 1024

EmbedOptions

FieldTypeDescription
inputstr | list[str]Text to embed
modelstr | NoneOverride default model

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.326 Jun 20264

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
abyss-systems/abyss-sdk-python

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:48 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:6efb72a3ee5d2f4b1759c86c824b3b2e35ecdad20835ef09ed7f6ca44633501c