Unwrap any json in md code block, when parsing chat actor responses

This is a more robust way to extract json output requested from
gemma-2 (2B, 9B) models which tend to return json in md codeblocks.

Other models should remain unaffected by this change.

Also removed request to not wrap json in codeblocks from prompts. As
code is doing the unwrapping automatically now, when present
This commit is contained in:
Debanjum Singh Solanky
2024-08-16 05:20:24 -05:00
parent ca45fce8ac
commit acdc3f9470
4 changed files with 11 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ dependencies = [
"pymupdf >= 1.23.5",
"django == 5.0.7",
"authlib == 1.2.1",
"llama-cpp-python == 0.2.82",
"llama-cpp-python == 0.2.88",
"itsdangerous == 2.1.2",
"httpx == 0.25.0",
"pgvector == 0.2.4",