Skip to main content

pharia-inference-sdk

Formerly the intelligence_layer/core package.

Overview

The pharia-inference-sdk provides essential functionality for the intelligence layer.

Installation

The SDK is published on PyPI.

To add the SDK as a dependency to an existing project managed, run

pip install pharia-inference-sdk

Usage

from pharia_inference_sdk.core.tracer import InMemoryTracer
from pharia_inference_sdk.core.model import Llama3InstructModel, Prompt, CompleteInput
from aleph_alpha_client import Client

client=Client(token="<token>", host="<inference-api-url>")
model = Llama3InstructModel(client=client)
tracer = InMemoryTracer()

prompt = Prompt.from_text(text="What is the most common fish in swedish lakes?")
model.complete(CompleteInput(prompt=prompt, maximum_tokens=32), tracer)

# see trace in rich format
tracer._rich_render_()

Contributing

We welcome contributions! Please see our Contributing Guide for details on how to set up the development environment and submit changes.

Metadata

Release files for pharia-inference-sdk 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pharia-inference-sdk 0.1.6
File Size Uploaded
pharia_inference_sdk-0.1.6.tar.gz 36.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pharia-inference-sdk 0.1.6
File Interpreter ABI Platform
pharia_inference_sdk-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 80.8 kB

Release files / pharia_inference_sdk-0.1.6.tar.gz

Download URL pharia_inference_sdk-0.1.6.tar.gz
Size 36.4 kB
Tags Source
SHA-256 checksum
How to use checksums
69ae17c6df3f8775732c98023de4638bbf736e652244e28d9168d19cd83933bf
BLAKE2b-256 checksum
How to use checksums
ba5238874e0453afda8a5e14fab94cf373c8e70cff13283d22e33de5a5e7bc3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.14

Release files / pharia_inference_sdk-0.1.6-py3-none-any.whl

Download URL pharia_inference_sdk-0.1.6-py3-none-any.whl
Size 44.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20678120917dbf28b4c9bd2122fd9538f271cbca661725a4b5559b06acf1e06e
BLAKE2b-256 checksum
How to use checksums
f4fd21a996ea0a1a0b2944cc1d7511e612405cd5f3a353b2b397cd4e5e01d9bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.14

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page