Simplify references and output instructions in LLM prompts
This commit is contained in:
@@ -93,7 +93,7 @@ func TestGlossaryModuleProposeMapsCorrectionsAndWritesDiagnostics(t *testing.T)
|
||||
responses: []proposal_generation.StructuredCorrectionSet{
|
||||
{
|
||||
Corrections: []proposal_generation.StructuredCorrectionProposal{
|
||||
{TargetSegmentID: 1, OriginalText: "gestures", CorrectedText: "Jesters", Confidence: 0.94},
|
||||
{SegmentReference: 1, OriginalText: "gestures", CorrectedText: "Jesters", Confidence: 0.94},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -42,10 +42,10 @@ func (f *fakeLLMClient) CompleteStructured(ctx context.Context, req contracts.St
|
||||
items, _ := payload["corrections"].([]map[string]any)
|
||||
for _, item := range items {
|
||||
target.Corrections = append(target.Corrections, proposal_generation.StructuredCorrectionProposal{
|
||||
TargetSegmentID: item["id"].(int),
|
||||
OriginalText: item["original_text"].(string),
|
||||
CorrectedText: item["corrected_text"].(string),
|
||||
Confidence: item["confidence"].(float64),
|
||||
SegmentReference: item["id"].(int),
|
||||
OriginalText: item["original_text"].(string),
|
||||
CorrectedText: item["corrected_text"].(string),
|
||||
Confidence: item["confidence"].(float64),
|
||||
})
|
||||
}
|
||||
return contracts.StructuredCompletionResponse{}, nil
|
||||
|
||||
@@ -94,7 +94,7 @@ func TestHomophonesModuleProposeMapsCorrectionsAndWritesDiagnostics(t *testing.T
|
||||
responses: []proposal_generation.StructuredCorrectionSet{
|
||||
{
|
||||
Corrections: []proposal_generation.StructuredCorrectionProposal{
|
||||
{TargetSegmentID: 1, OriginalText: "gestures", CorrectedText: "Jesters", Confidence: 0.94},
|
||||
{SegmentReference: 1, OriginalText: "gestures", CorrectedText: "Jesters", Confidence: 0.94},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -94,7 +94,7 @@ func TestSpokenWordModuleProposeMapsCorrectionsAndWritesDiagnostics(t *testing.T
|
||||
responses: []proposal_generation.StructuredCorrectionSet{
|
||||
{
|
||||
Corrections: []proposal_generation.StructuredCorrectionProposal{
|
||||
{TargetSegmentID: 1, OriginalText: "I I think", CorrectedText: "I think", Confidence: 0.94},
|
||||
{SegmentReference: 1, OriginalText: "I I think", CorrectedText: "I think", Confidence: 0.94},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user