fix: use correct 'shakespeare' model name in SasquatchGuide AI calls
Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
This commit is contained in:
parent
fadf36d86e
commit
4aebbc8798
1 changed files with 12 additions and 7 deletions
|
|
@ -225,9 +225,14 @@ export function SasquatchGuide({ message, onDismiss }: SasquatchGuideProps) {
|
|||
let accumulated = '';
|
||||
|
||||
// First pass: get AI response which may include a TOOL: call
|
||||
// Inject system prompt as first user message if system role unsupported
|
||||
const messagesWithSystem = [
|
||||
{ role: 'system' as const, content: SYSTEM_PROMPT },
|
||||
...history,
|
||||
];
|
||||
const firstResponse = await shakespeare.sendChatMessage(
|
||||
[{ role: 'system', content: SYSTEM_PROMPT }, ...history],
|
||||
'shakespeare/claude-sonnet-4-5'
|
||||
messagesWithSystem,
|
||||
'shakespeare'
|
||||
);
|
||||
|
||||
const aiText = firstResponse.choices[0]?.message?.content as string ?? '';
|
||||
|
|
@ -273,14 +278,14 @@ export function SasquatchGuide({ message, onDismiss }: SasquatchGuideProps) {
|
|||
setStreamingText('');
|
||||
const toolResultStr = JSON.stringify(toolResult, null, 2);
|
||||
const secondResponse = await shakespeare.sendChatMessage([
|
||||
{ role: 'system', content: SYSTEM_PROMPT },
|
||||
{ role: 'system' as const, content: SYSTEM_PROMPT },
|
||||
...history,
|
||||
{ role: 'assistant', content: aiText },
|
||||
{ role: 'assistant' as const, content: aiText },
|
||||
{
|
||||
role: 'user',
|
||||
content: `Tool result from ${toolName}:\n${toolResultStr}\n\nNow answer the user's question naturally based on this live data.`,
|
||||
role: 'user' as const,
|
||||
content: `Tool result from ${toolName}:\n${toolResultStr}\n\nNow answer the user's question naturally based on this live data. Be concise and skater-friendly.`,
|
||||
},
|
||||
], 'shakespeare/claude-sonnet-4-5');
|
||||
], 'shakespeare');
|
||||
|
||||
accumulated = secondResponse.choices[0]?.message?.content as string ?? '';
|
||||
} catch (toolErr) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue