List all commits for a prompt.
listCommits(promptIdentifier: string): AsyncIterableIterator<PromptCommit>| Name | Type | Description |
|---|---|---|
promptIdentifier* | string | The identifier of the prompt. Can be in the format:
|
// List commits for a private prompt
for await (const commit of client.listCommits("my-prompt")) {
console.log(commit);
}
// List commits for a prompt with explicit owner
for await (const commit of client.listCommits("owner/my-prompt")) {
console.log(commit);
}