Skip to content

Change a method

PATCH
/v1/methods/{method}
curl --request PATCH \
--url https://api.pensievelabs.co/v1/methods/fine-tuning \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "markdown": "# Curriculum fine-tuning\n\nFine-tune on easy cases first, then hard ones, in three stages.\n" }'

Replaces the file and raises its version by one. Experiments already designed keep the version they started with. Built-in methods can’t be changed: add a copy under a new slug.

method
required

A post-training method’s slug, such as fine-tuning. See List methods for what your workspace has.

string
<= 64 characters /^[a-z0-9]+(-[a-z0-9]+)*$/

Example

fine-tuning
Media typeapplication/json
object
markdown
required

The whole new file.

string
>= 1 characters <= 100000 characters

Example

{
"markdown": "# Curriculum fine-tuning\n\nFine-tune on easy cases first, then hard ones, in three stages.\n"
}

The method, at its new version.

Media typeapplication/json

A post-training method, written as a plain markdown file. It starts with a # title and a paragraph saying what the method does and when to try it; the rest is up to its author. Pensieve’s own files have Needs, Steps, Settings (what an experiment can change) and Checks. Agents read the file to design experiments with the method and follow it as written.

object
id
required

A post-training method’s slug, such as fine-tuning. See List methods for what your workspace has.

string
<= 64 characters /^[a-z0-9]+(-[a-z0-9]+)*$/
object
required
Allowed value: method
name
required

The file’s title.

string
description
required

The file’s first paragraph.

string
markdown
required

The whole file.

string
version
required

Goes up by one with every change. Each experiment records the version it ran.

integer
>= 1
built_in
required

Shipped by Pensieve. Built-in methods can’t be changed or removed.

boolean
created_at
required
string format: date-time
updated_at
required
string format: date-time

Example

{
"id": "fine-tuning",
"object": "method",
"name": "Fine-tuning"
}

Something went wrong; error.type says what.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request authentication permission not_found conflict rate_limit not_available server
message
required
string
param

The request field the error is about.

string | null
request_id
required
string

Example

{
"error": {
"type": "invalid_request"
}
}