Skip to content

Commit

Permalink
chore: remove debugging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
namwoam committed Jul 4, 2024
1 parent dee2a5c commit 1c911ba
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ai/cohere/v0/text_generation.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,12 @@ type textGenerationOutput struct {
}

func (e *execution) taskTextGeneration(in *structpb.Struct) (*structpb.Struct, error) {
fmt.Println("### taskTextGeneration start ###")

inputStruct := textGenerationInput{}
err := base.ConvertFromStructpb(in, &inputStruct)
if err != nil {
return nil, fmt.Errorf("error generating input struct: %v", err)
}
fmt.Println("### convert input struct completed ###")
messages := []*cohereSDK.Message{}

if inputStruct.SystemMsg != "" {
Expand All @@ -88,15 +86,13 @@ func (e *execution) taskTextGeneration(in *structpb.Struct) (*structpb.Struct, e
}
messages = append(messages, &message)
}
fmt.Println("### gather messagess completed ###")

documents := []map[string]string{}
for _, doc := range inputStruct.Documents {
document := map[string]string{}
document["text"] = doc
documents = append(documents, document)
}
fmt.Println("### gather documents completed ###")

req := cohereSDK.ChatRequest{
Message: inputStruct.Prompt,
Expand Down

0 comments on commit 1c911ba

Please sign in to comment.