Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support response_type in runprompt #556

Merged
merged 5 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions demo/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 17 additions & 11 deletions docs/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 17 additions & 11 deletions genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 17 additions & 11 deletions packages/core/src/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 15 additions & 9 deletions packages/core/src/types/prompt_template.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ interface ModelOptions extends ModelConnectionOptions {
*/
temperature?: number

pelikhan marked this conversation as resolved.
Show resolved Hide resolved
/**
* Specifies the type of output. Default is `markdown`. Use `responseSchema` to
* specify an output schema.
*/
responseType?: PromptTemplateResponseType

pelikhan marked this conversation as resolved.
Show resolved Hide resolved
pelikhan marked this conversation as resolved.
Show resolved Hide resolved
pelikhan marked this conversation as resolved.
Show resolved Hide resolved
/**
* JSON object schema for the output. Enables the `JSON` output mode.
*/
responseSchema?: JSONSchemaObject

pelikhan marked this conversation as resolved.
Show resolved Hide resolved
pelikhan marked this conversation as resolved.
Show resolved Hide resolved
/**
* “Top_p” or nucleus sampling is a setting that decides how many possible words to consider.
* A high “top_p” value means the model looks at more possible words, even the less likely ones,
Expand Down Expand Up @@ -169,20 +180,15 @@ interface ModelOptions extends ModelConnectionOptions {
}

interface ScriptRuntimeOptions {
system?: SystemPromptId[]

tools?: SystemToolId[]

/**
* Specifies the type of output. Default is `markdown`. Use `responseSchema` to
* specify an output schema.
* List of system script ids used by the prompt.
*/
responseType?: PromptTemplateResponseType
system?: SystemPromptId[]

pelikhan marked this conversation as resolved.
Show resolved Hide resolved
/**
* JSON object schema for the output. Enables the `JSON` output mode.
* List of tools used by the prompt.
*/
responseSchema?: JSONSchemaObject
tools?: SystemToolId[]
pelikhan marked this conversation as resolved.
Show resolved Hide resolved
pelikhan marked this conversation as resolved.
Show resolved Hide resolved

pelikhan marked this conversation as resolved.
Show resolved Hide resolved
/**
* Secrets required by the prompt
Expand Down
28 changes: 17 additions & 11 deletions packages/sample/genaisrc/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 17 additions & 11 deletions packages/sample/genaisrc/node/genaiscript.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/sample/genaisrc/pr-describe.genai.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
script({
model: "openai:gpt-4-32k",
files: [],
temperature: 1,
title: "pr-describe",
system: ["system", "system.fs_find_files", "system.fs_read_file"],
})
Expand Down Expand Up @@ -28,6 +29,7 @@ $`You are an expert software developer and architect.

## Instructions

- do NOT explain that GIT_DIFF displays changes in the codebase
- try to extract the intent of the changes, don't focus on the details
- use bullet points to list the changes
- use emojis to make the description more engaging
Expand Down
Loading
Loading