ask command is now mistral!

This commit is contained in:
2024-01-09 23:05:32 -07:00
parent df00ae34de
commit bc3b61c148
2 changed files with 45 additions and 4 deletions

View File

@@ -145,13 +145,13 @@ func (h *handler) cmdAsk(ctx context.Context, data cmdroute.CommandData) *api.In
return errorResponse(err)
}
respString, err := lib.OpenAITextGeneration(options.Prompt)
respString, err := lib.ReplicateTextGeneration(options.Prompt)
if err != nil {
fmt.Printf("ChatCompletion error: %v\n", err)
return &api.InteractionResponseData{
Content: option.NewNullableString("ChatCompletion Error!"),
AllowedMentions: &api.AllowedMentions{}, // don't mention anyone
AllowedMentions: &api.AllowedMentions{},
}
}
@@ -165,13 +165,13 @@ func (h *handler) cmdAsk(ctx context.Context, data cmdroute.CommandData) *api.In
return &api.InteractionResponseData{
Content: option.NewNullableString("Prompt: " + options.Prompt + "\n" + "Response:\n"),
AllowedMentions: &api.AllowedMentions{}, // don't mention anyone
AllowedMentions: &api.AllowedMentions{},
Files: []sendpart.File{file},
}
}
return &api.InteractionResponseData{
Content: option.NewNullableString("Prompt: " + options.Prompt + "\n" + "Response: " + respString),
AllowedMentions: &api.AllowedMentions{}, // don't mention anyone
AllowedMentions: &api.AllowedMentions{},
}
}