diff --git a/package.json b/package.json index 87bc7b4d..70d62f2a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Transcend Inc.", "name": "@transcend-io/cli", "description": "Small package containing useful typescript utilities.", - "version": "4.114.2", + "version": "4.115.0", "homepage": "https://github.com/transcend-io/cli", "repository": { "type": "git", diff --git a/src/ai/TranscendPromptManager.ts b/src/ai/TranscendPromptManager.ts index 97c7215e..b0756e9b 100644 --- a/src/ai/TranscendPromptManager.ts +++ b/src/ai/TranscendPromptManager.ts @@ -446,7 +446,14 @@ export class TranscendPromptManager< async reportAndParsePromptRun( promptName: TPromptName, { largeLanguageModel, ...options }: ReportPromptRunOptions, - ): Promise> { + ): Promise<{ + /** The ID of the prompt run created on Transcend */ + promptRunId: string; + /** The URL of the prompt run on Transcend */ + promptRunUrl: string; + /** Resulting prompt run */ + result: t.TypeOf; + }> { const name = options.name || `@transcend-io/cli-prompt-run-${new Date().toISOString()}`; @@ -508,7 +515,7 @@ export class TranscendPromptManager< } // report successful run - await reportPromptRun(this.graphQLClient, { + const promptRunId = await reportPromptRun(this.graphQLClient, { productArea: PromptRunProductArea.PromptManager, ...options, name, @@ -521,7 +528,11 @@ export class TranscendPromptManager< })), }); - return parsed; + return { + result: parsed, + promptRunId, + promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`, + }; } /** diff --git a/src/graphql/fetchPrompts.ts b/src/graphql/fetchPrompts.ts index 8d894ccd..4d1a546c 100644 --- a/src/graphql/fetchPrompts.ts +++ b/src/graphql/fetchPrompts.ts @@ -12,6 +12,12 @@ export interface Prompt { status: AssessmentStatus; /** The content of the prompt */ content: string; + /** Temperature to use with prompt */ + temperature: number; + /** Top P to use with prompt */ + topP: number; + /** Max tokens to sample for prompt */ + maxTokensToSample: number; } const PAGE_SIZE = 20; diff --git a/src/graphql/gqls/prompt.ts b/src/graphql/gqls/prompt.ts index 830e0187..d2aa623a 100644 --- a/src/graphql/gqls/prompt.ts +++ b/src/graphql/gqls/prompt.ts @@ -20,6 +20,9 @@ export const PROMPTS = gql` title status content + temperature + topP + maxTokensToSample } } } @@ -91,6 +94,9 @@ export const PROMPTS_WITH_VARIABLES = gql` title content status + temperature + topP + maxTokensToSample } promptPartials { id