-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: system prompt formatting for Vertex AI
Prior to this commit, system prompt messages were included by the `KurtVertexAI` as part of the `content` stream of messages. However, VertexAI requires system messages to be specified separately. This commit makes that change.
- Loading branch information
Showing
3 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
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
43 changes: 43 additions & 0 deletions
43
.../KurtVertexAI_generateNaturalLanguage_properly_formats_a_system_prompt_for_Vertex_AI.yaml
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 @@ | ||
step1Request: | ||
generationConfig: | ||
maxOutputTokens: 4096 | ||
temperature: 0.5 | ||
topP: 0.95 | ||
contents: | ||
- role: user | ||
parts: | ||
- text: Say hello! | ||
systemInstruction: | ||
role: system | ||
parts: | ||
- text: Don't be evil. | ||
step2RawChunks: | ||
- candidates: | ||
- content: | ||
role: model | ||
parts: | ||
- text: Hello | ||
index: 0 | ||
usageMetadata: {} | ||
- candidates: | ||
- content: | ||
role: model | ||
parts: | ||
- text: | | ||
! 👋 😊 | ||
finishReason: STOP | ||
index: 0 | ||
usageMetadata: | ||
promptTokenCount: 9 | ||
candidatesTokenCount: 6 | ||
totalTokenCount: 15 | ||
step3KurtEvents: | ||
- chunk: Hello | ||
- chunk: | | ||
! 👋 😊 | ||
- finished: true | ||
text: | | ||
Hello! 👋 😊 | ||
metadata: | ||
totalInputTokens: 9 | ||
totalOutputTokens: 6 |
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