Prompts

Deserialize

Deserialize a Prompt from the .prompt file format.

This returns a subset of the attributes required by a Prompt. This subset is the bit that defines the Prompt version (e.g. with model and temperature etc)

post/prompts/deserialize

Request

  • Base URL: https://api.humanloop.com/v5
  • URL: https://api.humanloop.com/v5/prompts/deserialize
  • Auth: API key in header X-API-KEY

Request body

promptstring required

Response

Successful Response

modelstring required

The model instance used, e.g. gpt-4. See supported models

endpoint'complete' | 'chat' | 'edit'

Supported model provider endpoints.

template_language'default' | 'jinja'

Template engine to use for rendering templates.

provider'anthropic' | 'bedrock' | 'cohere' | 'deepseek' | 'google' | 'groq' | 'mock' | 'openai' | 'openai_azure' | 'replicate'

Supported model providers.

max_tokensinteger

The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt

temperaturenumber double

What sampling temperature to use when making a generation. Higher values means the model will be more creative.

top_pnumber double

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.

presence_penaltynumber double

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.

frequency_penaltynumber double

Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.

otherobject

Other parameter values to be passed to the provider call.

seedinteger

If specified, model will make a best effort to sample deterministically, but it is not guaranteed.

linked_toolsstring[]

The IDs of the Tools in your organization that the model can choose to call if Tool calling is supported. The default deployed version of that tool is called.

attributesobject

Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used.

Changes

No recorded changes to this operation across all 1 revision of this API.