mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: add cover migration for document (#1929)
* feat: add cover migration for document * fix: should not delete the cover when selecting all * fix: chinese characters for openai
This commit is contained in:
@ -91,7 +91,13 @@ class HttpOpenAIRepository implements OpenAIRepository {
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return Right(TextCompletionResponse.fromJson(json.decode(response.body)));
|
||||
return Right(
|
||||
TextCompletionResponse.fromJson(
|
||||
json.decode(
|
||||
utf8.decode(response.bodyBytes),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Left(OpenAIError.fromJson(json.decode(response.body)['error']));
|
||||
}
|
||||
@ -119,7 +125,13 @@ class HttpOpenAIRepository implements OpenAIRepository {
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return Right(TextEditResponse.fromJson(json.decode(response.body)));
|
||||
return Right(
|
||||
TextEditResponse.fromJson(
|
||||
json.decode(
|
||||
utf8.decode(response.bodyBytes),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Left(OpenAIError.fromJson(json.decode(response.body)['error']));
|
||||
}
|
||||
|
Reference in New Issue
Block a user