From 6c953ff5799e71dce246fa859c7e47aae59468f1 Mon Sep 17 00:00:00 2001 From: unintendedfraud Date: Sat, 6 May 2023 11:56:22 +0200 Subject: [PATCH] fix regex --- openai/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openai/client.go b/openai/client.go index 9e0bff6..417399d 100644 --- a/openai/client.go +++ b/openai/client.go @@ -60,7 +60,7 @@ func (c Client) ChatCompletions(prompt string) (*CompletionResponse, error) { } func cleanPrompt(p string) string { - regex := regexp.MustCompile("(<@\d+>)") + regex := regexp.MustCompile("<@\\d+>") return regex.ReplaceAllString(p, "") }