basic system prompt
This commit is contained in:
1 parent
1b5abb566e
commit
b3be1a81e6
2 files changed
+6
-1
No files matched your search
@@ -35,12 +35,17 @@ func (s *ChatSession) run(ctx context.Context) (*domain.Message, error) {
|
|||||||
}
|
}
|
||||||
s.mu.Unlock()
|
s.mu.Unlock()
|
||||||
|
|
||||||
|
systemPrompt := &domain.Message{
|
||||||
|
Role: string(domain.RoleSystem),
|
||||||
|
Content: s.agent.SystemPrompt,
|
||||||
|
}
|
||||||
|
|
||||||
msg, err := s.llmEngine.Stream(
|
msg, err := s.llmEngine.Stream(
|
||||||
ctx,
|
ctx,
|
||||||
s.provider,
|
s.provider,
|
||||||
s.modelID,
|
s.modelID,
|
||||||
params,
|
params,
|
||||||
s.messages,
|
append([]*domain.Message{systemPrompt}, s.messages...),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Binary file not shown.
Reference in new issue
Block a user