-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[editor] PaLMTextParserPromptSchema (#738)
# [editor] PaLMTextParserPromptSchema Add the prompt schema for PaLM text models (text-bison). Note that our PaLMTextParser implementation is currently not using fully valid completion params (created #736 for that), so just selected the valid ones in accordance with https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/text <img width="1311" alt="Screenshot 2024-01-03 at 3 14 00 PM" src="https://github.com/lastmile-ai/aiconfig/assets/5060851/fac04b95-7c3b-4824-9c53-0327c3dd1a81">
- Loading branch information
Showing
2 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
python/src/aiconfig/editor/client/src/shared/prompt_schemas/PaLMTextParserPromptSchema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { PromptSchema } from "../../utils/promptUtils"; | ||
|
||
export const PaLMTextParserPromptSchema: PromptSchema = { | ||
// See https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/text for settings | ||
// and defaults. The settings below are supported settings specified in the PaLMTextParser | ||
// refine_completion_params implementation. | ||
input: { | ||
type: "string", | ||
}, | ||
model_settings: { | ||
type: "object", | ||
properties: { | ||
candidate_count: { | ||
type: "integer", | ||
minimum: 1, | ||
maximum: 4, | ||
}, | ||
temperature: { | ||
type: "number", | ||
minimum: 0, | ||
maximum: 1, | ||
}, | ||
top_p: { | ||
type: "number", | ||
minimum: 0, | ||
maximum: 1, | ||
}, | ||
top_k: { | ||
type: "integer", | ||
minimum: 1, | ||
maximum: 40, | ||
}, | ||
}, | ||
}, | ||
prompt_metadata: { | ||
type: "object", | ||
properties: { | ||
remember_chat_context: { | ||
type: "boolean", | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters