mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
fix: chatGPT support
This commit is contained in:
parent
7582449616
commit
999a8f1c1e
1 changed files with 2 additions and 1 deletions
|
|
@ -125,13 +125,14 @@ You run the command `{last_command}` and get the following error message: `{erro
|
|||
|
||||
let content = &json["choices"][0]["message"]["content"];
|
||||
|
||||
|
||||
let suggestion: AISuggest = {
|
||||
let str = {
|
||||
let str = content.as_str();
|
||||
if str.is_none() {
|
||||
return None;
|
||||
}
|
||||
str.unwrap()
|
||||
str.unwrap().trim_start_matches("```").trim_end_matches("```")
|
||||
} ;
|
||||
let json = serde_json::from_str(str);
|
||||
if json.is_err() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue