GameSentenceMiner 2.19.11__py3-none-any.whl → 2.19.12__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.
- GameSentenceMiner/ai/ai_prompting.py +8 -4
- {gamesentenceminer-2.19.11.dist-info → gamesentenceminer-2.19.12.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.19.11.dist-info → gamesentenceminer-2.19.12.dist-info}/RECORD +7 -7
- {gamesentenceminer-2.19.11.dist-info → gamesentenceminer-2.19.12.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.19.11.dist-info → gamesentenceminer-2.19.12.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.19.11.dist-info → gamesentenceminer-2.19.12.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.19.11.dist-info → gamesentenceminer-2.19.12.dist-info}/top_level.txt +0 -0
|
@@ -213,13 +213,17 @@ class OpenAIManager(AIManager):
|
|
|
213
213
|
text_output = response.choices[0].message.content.strip()
|
|
214
214
|
# get the json at the end of the message
|
|
215
215
|
if "{" in text_output and "}" in text_output:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
try:
|
|
217
|
+
json_output = text_output[text_output.find(
|
|
218
|
+
"{"):text_output.rfind("}")+1]
|
|
219
|
+
json_output = json_output.replace("{output:", '{"output":')
|
|
220
|
+
text_output = json.loads(json_output)['output']
|
|
221
|
+
except Exception as e:
|
|
222
|
+
self.logger.debug(f"Failed to parse JSON from response returning response raw: {e}", exc_info=True)
|
|
219
223
|
# self.logger.debug(f"Received response:\n{text_output}")
|
|
220
224
|
return text_output
|
|
221
225
|
except Exception as e:
|
|
222
|
-
self.logger.error(f"OpenAI processing failed: {e}")
|
|
226
|
+
self.logger.error(f"OpenAI processing failed: {e}", exc_info=True)
|
|
223
227
|
return f"Processing failed: {e}"
|
|
224
228
|
|
|
225
229
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: GameSentenceMiner
|
|
3
|
-
Version: 2.19.
|
|
3
|
+
Version: 2.19.12
|
|
4
4
|
Summary: A tool for mining sentences from games. Update: Dependencies, replay buffer based line searching, and bug fixes.
|
|
5
5
|
Author-email: Beangate <bpwhelan95@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -5,7 +5,7 @@ GameSentenceMiner/gsm.py,sha256=N4m3tqesHkwkgLeOAlBvzwCYiy2INNZ85maZWCdglUM,3618
|
|
|
5
5
|
GameSentenceMiner/obs.py,sha256=UB4_OJ-vZQbHyuupB8JmwhSFdYyQX_5f5TpRXU1D7Kk,43300
|
|
6
6
|
GameSentenceMiner/vad.py,sha256=iMSsoUZ7-aNoWKzDKfOHdB3Zk5U2hV7x5hqTny6rj08,21501
|
|
7
7
|
GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
GameSentenceMiner/ai/ai_prompting.py,sha256=
|
|
8
|
+
GameSentenceMiner/ai/ai_prompting.py,sha256=pjhNMcCjYLfmOz3n9IPFtKTkvFDBbQXsXwT5-vAhrBY,29429
|
|
9
9
|
GameSentenceMiner/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
GameSentenceMiner/assets/icon.png,sha256=9GRL8uXUAgkUSlvbm9Pv9o2poFVRGdW6s2ub_DeUD9M,937624
|
|
11
11
|
GameSentenceMiner/assets/icon128.png,sha256=l90j7biwdz5ahwOd5wZ-406ryEV9Pan93dquJQ3e1CI,18395
|
|
@@ -135,9 +135,9 @@ GameSentenceMiner/web/templates/components/kanji_grid/thousand_character_classic
|
|
|
135
135
|
GameSentenceMiner/web/templates/components/kanji_grid/wanikani_levels.json,sha256=8wjnnaYQqmho6t5tMxrIAc03512A2tYhQh5dfsQnfAM,11372
|
|
136
136
|
GameSentenceMiner/web/templates/components/kanji_grid/words_hk_frequency_list.json,sha256=wRkqZNPzz6DT9OTPHpXwfqW96Qb96stCQNNgOL-ZdKk,17535
|
|
137
137
|
GameSentenceMiner/wip/__init___.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
138
|
-
gamesentenceminer-2.19.
|
|
139
|
-
gamesentenceminer-2.19.
|
|
140
|
-
gamesentenceminer-2.19.
|
|
141
|
-
gamesentenceminer-2.19.
|
|
142
|
-
gamesentenceminer-2.19.
|
|
143
|
-
gamesentenceminer-2.19.
|
|
138
|
+
gamesentenceminer-2.19.12.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
139
|
+
gamesentenceminer-2.19.12.dist-info/METADATA,sha256=Pjz-4py4DFrG1qHv_igp7J56UK0E8M6fvLKcSuM4lkw,8181
|
|
140
|
+
gamesentenceminer-2.19.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
141
|
+
gamesentenceminer-2.19.12.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
|
142
|
+
gamesentenceminer-2.19.12.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
|
143
|
+
gamesentenceminer-2.19.12.dist-info/RECORD,,
|
|
File without changes
|
{gamesentenceminer-2.19.11.dist-info → gamesentenceminer-2.19.12.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{gamesentenceminer-2.19.11.dist-info → gamesentenceminer-2.19.12.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|