Skip to content

Commit

Permalink
Merge pull request #815 from bjwswang/main
Browse files Browse the repository at this point in the history
fix: set MaxNumberOfConcurrent to 1 if not provided
  • Loading branch information
bjwswang authored Mar 8, 2024
2 parents a42c127 + 0692bb3 commit d2a7365
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/samples/app_llmchain_abstract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ metadata:
spec:
displayName: "llm chain"
description: "llm chain"
maxNumberOfConccurent: 1
maxTokens: 20480
maxLength: 20480
model: "6ac7baa2-71e7-4ffc-bd49-9356e743ecbb"
Expand Down
2 changes: 1 addition & 1 deletion pkg/appruntime/chain/mpchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (l *MapReduceChain) Run(ctx context.Context, _ client.Client, args map[stri
v2, ok := args["max_number_of_conccurent"]
if ok {
maxNumberOfConcurrent, ok := v2.(int)
if ok {
if ok && maxNumberOfConcurrent > 0 {
l.MapReduceDocuments.MaxNumberOfConcurrent = maxNumberOfConcurrent
}
}
Expand Down

0 comments on commit d2a7365

Please sign in to comment.