A package for working with fireworks.ai without dependencies.
Project description
illuminations
A package for working with fireworks.ai without dependencies.
pip install illuminations
Then:
# Python
import illuminations
After that:
from yaml import safe_load as yl
from illuminations.messages import message
kwargs = """ # this is a string in YAML format
max_tokens: 32000
stop_sequences:
- STOP
- "\nTitle"
temperature: 1.0
top_k: 10
top_p: 0.5
thinking:
type: enabled
budget_tokens: 24576
display: summarized
tool_choice:
type: auto
disable_parallel_tool_use: false
"""
instruction = 'You are a helpful assistant. Important: Do not use markdown or lists in your responses.'
get_weather_tool_str = """ # YAML definition of a function
name: get_weather
description: Determine weather in a location
input_schema:
type: object
properties:
location:
type: string
description: The city and state, e.g. San Francisco, CA
additionalProperties: true
required:
- location
"""
tools = [yl(get_weather_tool_str)]
msg = [{'role': 'user', 'content': 'What is the weather in Chicago, IL and Paris, France?'}]
thoughts, text = message(
messages=msg,
instructions=instruction,
tools=tools,
**yl(kwargs)
)
or
from yaml import safe_load as yl
from illuminations.chat import chat_complete as cc
kwargs = """ # this is a string in YAML format
max_tokens: 32000
stop_sequences:
- STOP
- "\nTitle"
temperature: 1.0
top_k: 10
top_p: 0.5
reasoning_effort: high
"""
instruction = 'You are a helpful assistant. Do not use markdown or lists in your responses.'
weather_tool = """ # YAML definition of a function (old format)
type: function
function:
name: get_weather
description: Determine weather in a location
parameters:
type: object
properties:
location:
type: string
description: The city and state, e.g. San Francisco, CA
additionalProperties: false
required:
- location
"""
tools = [yl(weather_tool)]
msgs = [{'role': 'user', 'content': 'What is the weather in Chicago, IL and Paris, France?'}]
thoughts, text = cc(
messages=msgs,
instructions=instruction,
tools=tools,
**yl(kwargs)
)
or
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file illuminations-0.0.28.tar.gz.
File metadata
- Download URL: illuminations-0.0.28.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57d0ab42e1338b315d876981df99045f42b11d7accdfffb853b0c021df8a8f5d
|
|
| MD5 |
0adfab65efaf1e746cbc5ab4947a51fc
|
|
| BLAKE2b-256 |
06dc15f8c3c0b4cd6949ed3a8059ccf5eea94f4581519f514c3b2c9bbd63ec17
|
Provenance
The following attestation bundles were made for illuminations-0.0.28.tar.gz:
Publisher:
python-publish.yml on alxfed/illuminations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
illuminations-0.0.28.tar.gz -
Subject digest:
57d0ab42e1338b315d876981df99045f42b11d7accdfffb853b0c021df8a8f5d - Sigstore transparency entry: 2187372841
- Sigstore integration time:
-
Permalink:
alxfed/illuminations@0553cb7da61ac5e164cd254adca4bf5cf3f04ac5 -
Branch / Tag:
refs/tags/0.0.28 - Owner: https://github.com/alxfed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0553cb7da61ac5e164cd254adca4bf5cf3f04ac5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file illuminations-0.0.28-py3-none-any.whl.
File metadata
- Download URL: illuminations-0.0.28-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43aab593660cb9ac6ca73c7e9b01bf2c20bc66bf7a072c0007e4cd191fc01db1
|
|
| MD5 |
917aa398700f010ce46aaee44da19e93
|
|
| BLAKE2b-256 |
9dd48ed66fe9ca7b4c4f33eb374ef7f9bf576b990fc314ff1b02ce87e78a6ae4
|
Provenance
The following attestation bundles were made for illuminations-0.0.28-py3-none-any.whl:
Publisher:
python-publish.yml on alxfed/illuminations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
illuminations-0.0.28-py3-none-any.whl -
Subject digest:
43aab593660cb9ac6ca73c7e9b01bf2c20bc66bf7a072c0007e4cd191fc01db1 - Sigstore transparency entry: 2187372863
- Sigstore integration time:
-
Permalink:
alxfed/illuminations@0553cb7da61ac5e164cd254adca4bf5cf3f04ac5 -
Branch / Tag:
refs/tags/0.0.28 - Owner: https://github.com/alxfed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0553cb7da61ac5e164cd254adca4bf5cf3f04ac5 -
Trigger Event:
release
-
Statement type: