Sysprompt provides an SDK to streamline the process of fetching, rendering, and using your prompts. Currently, the SDK is available for Python, with a Node.js version coming soon.
Sysprompt is a platform (CMS + prompt editor) designed to help you:
spk_****************
).
Install the Sysprompt Python SDK via pip:
pip install sysprompt
Once installed, you can fetch a prompt from Sysprompt, fill in the necessary variables, and use it in your application logic—whether you’re integrating with OpenAI or another LLM.
from sysprompt import SysPrompt
import openai
# Initialize with your Sysprompt API key
sysprompt = SysPrompt("spk_****************")
# Compile your prompt from Sysprompt, injecting any variables you need
prompt_messages = sysprompt.compile(
"untitled_T1iqKwGtIvpw", # Your prompt ID or reference
{
"specific_topic": "customer onboarding",
# Add more key-value pairs for other variables in your prompt
}
)
# Example integration with an OpenAI chat model
response = openai.ChatCompletion.create(
model="gpt-4o-mini-2024-07-18",
messages=prompt_messages
)
print(response.choices[0].message.content)
A Node.js SDK is in development. When released, it will provide similar functionality for JavaScript developers, allowing for quick and efficient prompt retrieval and usage in Node-based environments.
That’s it! With just a few steps, you can integrate Sysprompt into your Python application and start using your prompts right away, without needing frequent code changes every time you update a prompt. For any questions or feature requests, email us at support@sysprompt.com.