mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-02 11:39:24 +01:00
Add more debugging info when OpenAI API returns zero responses for #167
This commit is contained in:
parent
212c24c30c
commit
80454d3859
@ -103,7 +103,7 @@ func GetAiSuggestionsViaOpenAiApi(query, shellName, osName string, numberComplet
|
||||
return nil, OpenAiUsage{}, fmt.Errorf("failed to parse OpenAI API response=%#v: %w", bodyText, err)
|
||||
}
|
||||
if len(apiResp.Choices) == 0 {
|
||||
return nil, OpenAiUsage{}, fmt.Errorf("OpenAI API returned zero choices, resp=%#v", apiResp)
|
||||
return nil, OpenAiUsage{}, fmt.Errorf("OpenAI API returned zero choices, parsed resp=%#v, resp body=%#v", apiResp, bodyText)
|
||||
}
|
||||
ret := make([]string, 0)
|
||||
for _, item := range apiResp.Choices {
|
||||
|
Loading…
Reference in New Issue
Block a user