mirror of
https://github.com/FJurmanovic/sugarr.git
synced 2026-11-11 07:41:08 +00:00
update compose
This commit is contained in:
@@ -70,7 +70,11 @@ func (c *LLMClient) Recommend(prompt string) ([]model.MovieSuggestion, error) {
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("llm returned status %d", resp.StatusCode)
|
||||
var chatResp interface{}
|
||||
if err := json.NewDecoder(resp.Body).Decode(&chatResp); err != nil {
|
||||
return nil, fmt.Errorf("decoding llm response: %w", err)
|
||||
}
|
||||
return nil, fmt.Errorf("llm returned status %d with body: %s", resp.StatusCode, chatResp)
|
||||
}
|
||||
|
||||
var chatResp chatResponse
|
||||
|
||||
Reference in New Issue
Block a user