edi-core 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl

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.

@@ -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
- data=payload.to_json()
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: edi-core
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: LtttAZ
@@ -1,7 +1,7 @@
1
1
  edi_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  edi_core/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  edi_core/ai/writesonic/__init__.py,sha256=QCibWjBh4QqvUeJUscjByC-zHd__21J6jfTPJcWJxO8,412
4
- edi_core/ai/writesonic/chatsonic.py,sha256=cmV1445v6cnvxY3kSkU5uLyLcPCHjWhvpEQ6zbfR9ug,3098
4
+ edi_core/ai/writesonic/chatsonic.py,sha256=MbZNp6MecZ-iQqNNEBomzHhxa3RBUda6gJIRcUhnVN0,3065
5
5
  edi_core/algo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  edi_core/algo/silder_puzzle.py,sha256=lyPvnL32VAsTghrz2WBsPMPJqnMeFxbBgSt4khfPNVI,586
7
7
  edi_core/auto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -20,6 +20,6 @@ edi_core/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  edi_core/util/datetime.py,sha256=sctJzZw_Uruq-qp6IW_JuqZvcJq_fXDbTMpfEwkAPlg,117
21
21
  edi_core/util/environment.py,sha256=rQmkKN5TWuhe-2NNGirQCeVW95dLz27pjeYDsB5yIII,175
22
22
  edi_core/util/pyproject.py,sha256=3mdC-a6rqx9zlZUHeGyDIjz0EcT_TmTINRKLxYRvIac,325
23
- edi_core-0.3.0.dist-info/METADATA,sha256=8vjVJGMonLuydRI4BB26XNrfgfVkDwRBDvPLnAQ4IH0,876
24
- edi_core-0.3.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
25
- edi_core-0.3.0.dist-info/RECORD,,
23
+ edi_core-0.4.0.dist-info/METADATA,sha256=qBDOeo0Ss6WBcO-cOgW6IovzO-T_P81uv_CVBjbL634,876
24
+ edi_core-0.4.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
25
+ edi_core-0.4.0.dist-info/RECORD,,