Skip to content

Commit 81bcd53

Browse files
Prithivi DaPrithivi Da
authored andcommitted
fix LLM prompt faithfulness
1 parent a64e146 commit 81bcd53

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
setup(
4040
name='Route0x',
41-
version='0.1.22',
41+
version='0.1.24',
4242
description='Low latency, High Accuracy, Custom Query routers.',
4343
packages=find_packages(where="src"),
4444
package_dir={'': 'src'},

src/route0x/route_builder/route_builder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,11 @@ def _generate_synthetic_queries(
462462
self.logger.debug(response)
463463
else:
464464
resp_obj = json.loads(response)
465+
self.logger.debug(resp_obj)
465466
if "queries" in resp_obj:
466467
examples = resp_obj["queries"]
468+
elif isinstance(resp_obj, list):
469+
examples = resp_obj
467470
else:
468471
self.logger.error("LLM Prompt failed to stick to the schema")
469472
sys.exit(0)

src/route0x/route_builder/unified_llm_caller.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def _generate_google(self, prompt):
6161
"top_p": 1.0,
6262
"top_k": 0,
6363
"max_output_tokens": 4000,
64-
"response_mime_type": "application/json",
6564
}
6665

6766
# Build the API URL with your API key

0 commit comments

Comments
 (0)