Quick Start
This guide will help you get started with the Pharia Inference SDK quickly.
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_()
Next Steps
Explore the complete API Reference for detailed documentation
Check out the GitHub Repository for examples
Visit the PyPI Package page for more information