Stephanie Gredell 5 months ago
parent
commit
b3fdf93ad1
  1. 2
      clients/openai.go
  2. 1
      main.go

2
clients/openai.go

@ -51,7 +51,7 @@ func NewClient(model string) *OpenAIClient { @@ -51,7 +51,7 @@ func NewClient(model string) *OpenAIClient {
})
return &OpenAIClient{
APIKey: os.Getenv("OPENAI_API_KEY"),
APIKey: os.Getenv("OPEN_AI_SECRET"),
Model: model,
}
}

1
main.go

@ -40,6 +40,7 @@ func main() { @@ -40,6 +40,7 @@ func main() {
func chatHandler(w http.ResponseWriter, r *http.Request) {
fmt.Printf("we reach the chat handler")
historyMutex.Lock()
defer historyMutex.Unlock()

Loading…
Cancel
Save