Skip to main content

placeholder

Project description

sik-llms

  • Easy llm interface; eliminates parsing json responses or building up json for functions/tools
    • OpenAI and any OpenAI-compatible API
    • Anthropic
  • Sync and Async support
  • Functions/Tools
  • Structured Output
    • Supports Anthropic models even though structured output is not natively supported in their models
  • Reasoning

See examples

from sik_llms import create_client, user_message, ResponseChunk

model = create_client(
    model_name='gpt-4o-mini',  # or e.g. 'claude-3-7-sonnet-latest'
    temperature=0.1,
)
messages = [
    system_message("You are a helpful assistant."),
    user_message("What is the capital of France?"),
]

# sync
response = model(messages=messages)

# async streaming
responses = []
summary = None
async for response in model.run_async(messages=messages):
    if isinstance(response, ResponseChunk):
        print(response.content, end="")
        responses.append(response)
    else:
        summary = response

print(summary)

Installation

uv install sik-llms or pip install sik-llms

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

sik_llms-0.2.0.tar.gz (70.6 kB view details)

Uploaded Source

Built Distribution

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

sik_llms-0.2.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file sik_llms-0.2.0.tar.gz.

File metadata

  • Download URL: sik_llms-0.2.0.tar.gz
  • Upload date:
  • Size: 70.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.24

File hashes

Hashes for sik_llms-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1d791e84a0da0750ee71ec2298c65cec0cde1f403cab040bc09ec9800f4c25d6
MD5 0a43ad8688193f2dff8c8eef3a404cca
BLAKE2b-256 e0ba337196d0ef447c6ba31f03b8ceba430d2be8dd0967f5efe2c6ca59b5c39d

See more details on using hashes here.

File details

Details for the file sik_llms-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sik_llms-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.24

File hashes

Hashes for sik_llms-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1399b59f7c47d619fd213bce7d409a9ca6614a59170167e13cfd407c50e461c6
MD5 0d54abd9d174942d158439960c190ef5
BLAKE2b-256 089bf193752d1227b991b3b39b86c0464efa7662893b221783380c594cf4843a

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