LlamaIndex LLM Integration: Stepfun
Installation
To install the required packages, run:
%pip install llama-index-llms-stepfun
!pip install llama-index
Setup
Initialize StepFun LLM
First, import the necessary libraries and set up your StepFun instance. Replace step-1v-8k, and TOKEN with your model name, and API key, respectively:
import os
from typing import List, Optional
from llama_index.llms.stepfun import StepFun
from llama_index.core.llms import ChatMessage
llm = StepFun(
api_key="TOKEN",
max_tokens=256,
context_window=4096,
model="step-1v-8k",
)
Chat Functionality
StepFun supports chat APIs, allowing you to handle conversation-like interactions. Here’s how to use it:
from llama_index.llms.stepfun import StepFun
from llama_index.core.llms import ChatMessage
llm = StepFun(
api_key="",
max_tokens=256,
context_window=4096,
model="step-1v-8k",
)
message = ChatMessage(role="user", content="Tell me a joke")
resp = llm.chat([message])
print(resp)
Metadata
Release files for llama-index-llms-stepfun 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llama_index_llms_stepfun-1.3.1.tar.gz | 4.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llama_index_llms_stepfun-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / llama_index_llms_stepfun-1.3.1.tar.gz
| Download URL | llama_index_llms_stepfun-1.3.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9b20b69874d75387aa493b683c132ab5bc19330dafe74ad23ff9ef751c4eac1
|
|
BLAKE2b-256 checksum How to use checksums |
c03f7124a7b4cd349ec3bff0042423646d67d3195d6ce42440f39b29734348d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_llms_stepfun-1.3.1-py3-none-any.whl
| Download URL | llama_index_llms_stepfun-1.3.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1320477306117f1f8ccd77545722a23ea7bddd94a6032f47acd94b5e636ccab1
|
|
BLAKE2b-256 checksum How to use checksums |
477f1d6962da6f50fcc3ebdbfb457789597a50779c0a2c3e7a0538f291f0c55e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llama-index-llms-stepfun 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.