https://github.com/aleph-alpha/pharia-inference-sdk
https://github.com/aleph-alpha/pharia-inference-sdk
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/aleph-alpha/pharia-inference-sdk
- Owner: Aleph-Alpha
- License: apache-2.0
- Created: 2025-06-09T09:47:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-24T16:15:19.000Z (about 1 year ago)
- Last Synced: 2025-06-24T16:47:52.668Z (about 1 year ago)
- Language: Python
- Homepage: https://pharia-inference-sdk.readthedocs.io/en/latest/
- Size: 663 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://pypi.org/project/pharia-inference-sdk/).
To add the SDK as a dependency to an existing project managed, run
```bash
pip install pharia-inference-sdk
```
## Usage
```python
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="", host="")
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](https://github.com/Aleph-Alpha/pharia-inference-sdk/blob/main/CONTRIBUTING.md) for details on how to set up the development environment and submit changes.