Skip to content

Commit

Permalink
fix ai generate text for frontend jobtype (#1873)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzelei committed Apr 30, 2024
1 parent 15ac52f commit 23075c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/apps/web/app/(mgmt)/[account]/jobs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function JobTable(props: JobTableProps): ReactElement {
if (j.source?.options?.config.case === 'generate') {
jobtype = 'Generate';
} else if (j.source?.options?.config.case === 'aiGenerate') {
jobtype = 'Ai Generate';
jobtype = 'AI Generate';
}
return {
...j,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (b *benthosBuilder) getAiGenerateBenthosConfigResponses(

tableColsMap, ok := groupedSchemas[dbschemas_utils.BuildTable(schema.GetSchema(), table.GetTable())]
if !ok {
return nil, nil, fmt.Errorf("did not find schema data when building Ai Generate config: %s", schema.GetSchema())
return nil, nil, fmt.Errorf("did not find schema data when building AI Generate config: %s", schema.GetSchema())
}
for col, info := range tableColsMap {
columns = append(columns, &aiGenerateColumn{
Expand All @@ -84,7 +84,7 @@ func (b *benthosBuilder) getAiGenerateBenthosConfigResponses(
}
}
if len(mappings) == 0 {
return nil, nil, fmt.Errorf("did not generate any mapping configs during ai generate build for connection: %s", constraintConnection.GetId())
return nil, nil, fmt.Errorf("did not generate any mapping configs during AI Generate build for connection: %s", constraintConnection.GetId())
}

var userPrompt *string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (b *benthosBuilder) GenerateBenthosConfigs(
case *mgmtv1alpha1.JobSourceOptions_AiGenerate:
sourceResponses, aimappings, err := b.getAiGenerateBenthosConfigResponses(ctx, job, slogger)
if err != nil {
return nil, fmt.Errorf("unable to build benthos ai generate source config responses: %w", err)
return nil, fmt.Errorf("unable to build benthos AI Generate source config responses: %w", err)
}
aiGenerateMappings = aimappings
responses = append(responses, sourceResponses...)
Expand Down

0 comments on commit 23075c4

Please sign in to comment.