Skip to main content

No project description provided

Project description

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.

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

pharia_inference_sdk-0.1.5.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

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

pharia_inference_sdk-0.1.5-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file pharia_inference_sdk-0.1.5.tar.gz.

File metadata

  • Download URL: pharia_inference_sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.13

File hashes

Hashes for pharia_inference_sdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 65c8039aa15b7f793e3e5b61bd193c477fa99da6d202255ae2f707140e66bb5f
MD5 c0d24b9fa700fb4c6485bef947b41c52
BLAKE2b-256 b5328658b31b19ab4db9056709dc6250da1d1ab917dae76f4f14c408cc7b8526

See more details on using hashes here.

File details

Details for the file pharia_inference_sdk-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for pharia_inference_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a1f29bde1cf361e6e4e315838c8975b092bf05f2a127f7798b588e6451cd6efc
MD5 648a82f7afd4f1be3cf9c1f7edf3b1fa
BLAKE2b-256 bac36304563ae6166080af95549e8562fd7d66694d427c3bf55613a2cc48c972

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