edi-core 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of edi-core might be problematic. Click here for more details.
- {edi_core-0.3.0 → edi_core-0.4.0}/PKG-INFO +1 -1
- {edi_core-0.3.0 → edi_core-0.4.0}/pyproject.toml +1 -1
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/ai/writesonic/chatsonic.py +3 -6
- {edi_core-0.3.0 → edi_core-0.4.0}/README.md +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/ai/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/ai/writesonic/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/algo/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/algo/silder_puzzle.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/auto/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/auto/control.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/cloud/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/cloud/aliyun.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/db/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/db/tinydb.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/file/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/file/file.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/file/filetype.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/file/hash.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/parser/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/parser/toml_parser.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/util/__init__.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/util/datetime.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/util/environment.py +0 -0
- {edi_core-0.3.0 → edi_core-0.4.0}/src/edi_core/util/pyproject.py +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import json
|
|
2
1
|
import os
|
|
3
2
|
from dataclasses import dataclass, field
|
|
4
3
|
from typing import List
|
|
@@ -52,9 +51,6 @@ class ChatSonicPayload:
|
|
|
52
51
|
self.enable_memory = config.enable_memory
|
|
53
52
|
self.enable_google_results = config.enable_google_results
|
|
54
53
|
|
|
55
|
-
def to_json(self):
|
|
56
|
-
return json.dumps(self.__dict__)
|
|
57
|
-
|
|
58
54
|
|
|
59
55
|
@dataclass
|
|
60
56
|
class ChatSonicResponse:
|
|
@@ -83,7 +79,8 @@ class ChatSonic:
|
|
|
83
79
|
url=url,
|
|
84
80
|
headers=self.get_request_headers(),
|
|
85
81
|
params=self.get_request_params(),
|
|
86
|
-
|
|
82
|
+
json=payload.__dict__,
|
|
83
|
+
timeout=60
|
|
87
84
|
)
|
|
88
85
|
|
|
89
86
|
raw_response.raise_for_status()
|
|
@@ -93,7 +90,7 @@ class ChatSonic:
|
|
|
93
90
|
|
|
94
91
|
return response, payload
|
|
95
92
|
|
|
96
|
-
def chat(self, message: str) -> ChatSonicPayload:
|
|
93
|
+
def chat(self, message: str) -> (ChatSonicResponse, ChatSonicPayload):
|
|
97
94
|
payload = ChatSonicPayload(input_text=message);
|
|
98
95
|
payload.set_config(self._config)
|
|
99
96
|
return self.call(payload)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|