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.6.tar.gz (36.4 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.6-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pharia_inference_sdk-0.1.6.tar.gz
Algorithm Hash digest
SHA256 69ae17c6df3f8775732c98023de4638bbf736e652244e28d9168d19cd83933bf
MD5 2781fae8b8e1ae90e0bc0a9adc46e886
BLAKE2b-256 ba5238874e0453afda8a5e14fab94cf373c8e70cff13283d22e33de5a5e7bc3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pharia_inference_sdk-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 20678120917dbf28b4c9bd2122fd9538f271cbca661725a4b5559b06acf1e06e
MD5 fdc03917eeaf4f3dd6c38f5742cda1f2
BLAKE2b-256 f4fd21a996ea0a1a0b2944cc1d7511e612405cd5f3a353b2b397cd4e5e01d9bd

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