Skip to content

Commit

Permalink
Merge pull request #619 from narengogi/fix/bedrock-mistral-llama-chat…
Browse files Browse the repository at this point in the history
…-templating

fix: chat templating for llama and mistral hosted on bedrock
  • Loading branch information
VisargD committed Sep 22, 2024
2 parents 114895d + cb690c8 commit 408b92b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/bedrock/chatComplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export const BedrockLLamaChatCompleteConfig: ProviderConfig = {
let messages: Message[] = params.messages;
messages.forEach((msg, index) => {
if (index === 0 && msg.role === 'system') {
prompt += `system: ${messages}\n`;
prompt += `system: ${msg.content}\n`;
} else if (msg.role == 'user') {
prompt += `user: ${msg.content}\n`;
} else if (msg.role == 'assistant') {
Expand Down Expand Up @@ -418,7 +418,7 @@ export const BedrockMistralChatCompleteConfig: ProviderConfig = {
let messages: Message[] = params.messages;
messages.forEach((msg, index) => {
if (index === 0 && msg.role === 'system') {
prompt += `system: ${messages}\n`;
prompt += `system: ${msg.content}\n`;
} else if (msg.role == 'user') {
prompt += `user: ${msg.content}\n`;
} else if (msg.role == 'assistant') {
Expand Down

0 comments on commit 408b92b

Please sign in to comment.