Manage prompts centrally, fetch versions, and use variables for dynamic prompts
The Prompt-Hub allows you to manage prompts, fetch specific versions of the prompt, and compile prompts with variables.
{{variableName}}
placeholders that are dynamically replaced at runtime.List of Prompts
Get a quick overview of all prompts created.
Create or Edit a Prompt
Build new prompts or edit existing ones with ease.
{{variableName}}
to represent dynamic data that will be substituted when the prompt is compiled.View Prompt Details
Once the prompt is creaetd, You can see information about the prompt along with details on all past versions.
Retrieve the Prompt
Create an API Key
To authenticate your requests, you need an API key. Here’s how you can create one:
Get prompt using the SDK
Here’s how you can fetch and compile a prompt in Python:
Below are the parameters for use with the SDK, formatted to indicate whether each is required or optional:
Parameter | Description |
---|---|
url | Sets the OpenLIT URL. Defaults to the OPENLIT_URL environment variable. |
api_key | Sets the OpenLIT API Key. Can also be provided via the OPENLIT_API_KEY environment variable. |
name | Sets the name to fetch a unique prompt. Use this or prompt_id . |
prompt_id | Sets the ID to fetch a unique prompt. Use this or name . Optional |
version | Set to True to get the prompt with variable substitution.. Optional |
shouldCompile | Boolean value that compiles the prompt using the provided variables. Optional |
variables | Sets the variables for prompt compilation. Optional |
meta_properties | Sets the meta-properties for storing in the prompt’s access history metadata. Optional |
Here’s how you can fetch and compile a prompt in Python:
Below are the parameters for use with the SDK, formatted to indicate whether each is required or optional:
Parameter | Description |
---|---|
url | Sets the OpenLIT URL. Defaults to the OPENLIT_URL environment variable. |
api_key | Sets the OpenLIT API Key. Can also be provided via the OPENLIT_API_KEY environment variable. |
name | Sets the name to fetch a unique prompt. Use this or prompt_id . |
prompt_id | Sets the ID to fetch a unique prompt. Use this or name . Optional |
version | Set to True to get the prompt with variable substitution.. Optional |
shouldCompile | Boolean value that compiles the prompt using the provided variables. Optional |
variables | Sets the variables for prompt compilation. Optional |
meta_properties | Sets the meta-properties for storing in the prompt’s access history metadata. Optional |
Here’s how you can fetch and compile a prompt in Typescript/Javascript:
Below are the parameters for use with the SDK, formatted to indicate whether each is required or optional:
Parameter | Description |
---|---|
url | Sets the OpenLIT URL. Defaults to the OPENLIT_URL environment variable or http://127.0.0.1:3000 if not set. |
apiKey | Sets the OpenLIT API Key. Can also be provided via the OPENLIT_API_KEY environment variable. |
name | Sets the name to fetch a unique prompt. Use this or promptId . |
promptId | Sets the ID to fetch a unique prompt. Use this or name . Optional |
version | Sets the version to retrieve a specific prompt. Optional |
shouldCompile | Boolean value that compiles the prompt using the provided variables. Optional |
variables | Sets the variables for prompt compilation. Optional |
metaProperties | Sets the meta-properties for storing in the prompt’s access history metadata. |
To retrieve the prompt via an API request, Refer to the GET Prompt API Reference Documentation.
Integrate your AI Stack with OpenLIT
Connect to your existing Observablity Stack