Skip to content

Commit

Permalink
Update version to v1.4.118 and commit
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 5, 2024
1 parent fcfcf55 commit 43ca0dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
21 changes: 10 additions & 11 deletions core/chatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ func (o *Chatter) BuildSession(request *common.ChatRequest, raw bool) (session *
}

// Process any template variables in the message content (user input)
// Double curly braces {{variable}} indicate template substitution
// Double curly braces {{variable}} indicate template substitution
// Ensure we have a message before processing, other wise we'll get an error when we pass to pattern.go
if request.Message == nil {
request.Message = &goopenai.ChatCompletionMessage{
Role: goopenai.ChatMessageRoleUser,
Content: " ",
Role: goopenai.ChatMessageRoleUser,
Content: " ",
}
}

Expand All @@ -128,16 +128,15 @@ func (o *Chatter) BuildSession(request *common.ChatRequest, raw bool) (session *

var patternContent string
if request.PatternName != "" {
pattern, err := o.db.Patterns.GetApplyVariables(request.PatternName, request.PatternVariables, request.Message.Content)
// pattrn will now contain user input, and all variables will be resolved, or errored
if err != nil {
return nil, fmt.Errorf("could not get pattern %s: %v", request.PatternName, err)
}
patternContent = pattern.Pattern
pattern, err := o.db.Patterns.GetApplyVariables(request.PatternName, request.PatternVariables, request.Message.Content)
// pattrn will now contain user input, and all variables will be resolved, or errored

if err != nil {
return nil, fmt.Errorf("could not get pattern %s: %v", request.PatternName, err)
}
patternContent = pattern.Pattern
}


systemMessage := strings.TrimSpace(contextContent) + strings.TrimSpace(patternContent)
if request.Language != "" {
systemMessage = fmt.Sprintf("%s. Please use the language '%s' for the output.", systemMessage, request.Language)
Expand Down
2 changes: 1 addition & 1 deletion pkgs/fabric/version.nix
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"1.4.117"
"1.4.118"
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

var version = "v1.4.117"
var version = "v1.4.118"

0 comments on commit 43ca0dc

Please sign in to comment.