From 4e35601e2af7117224fb66b1bfa3184077cc3453 Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Sun, 5 May 2024 23:47:16 +0700 Subject: [PATCH] update --- src/interface.jl | 4 ++-- src/llmfunction.jl | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index 499fdbe..62f46d3 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -228,7 +228,7 @@ function progressValueEstimator(a::T1, state::T2)::Tuple{String, Integer} where """ You should only respond in JSON format as describe below: { - "Evaluation": {"evaluation": "your evaluation", "score": your evaluation score} + "Evaluation": {"evaluation": "your evaluation", "score": "your evaluation score"} } """ @@ -305,7 +305,7 @@ function progressValueEstimator(a::T1, state::T2)::Tuple{String, Integer} where """ Here is an expected JSON format: { - "Evaluation": {"evaluation": "...", "score": ...} + "Evaluation": {"evaluation": "...", "score": "..."} } """ thoughtJsonStr = jsoncorrection(a, _thoughtJsonStr, expectedJsonExample) diff --git a/src/llmfunction.jl b/src/llmfunction.jl index ae25718..6d62cad 100644 --- a/src/llmfunction.jl +++ b/src/llmfunction.jl @@ -242,6 +242,10 @@ function jsoncorrection(a::T1, input::T2, break catch e @warn "Attempting correct JSON string. $attemptround" + e = """$e""" + if occursin("EOF", e) + e = split(e, "EOF")[1] * "EOF" + end incorrectjson = deepcopy(input) _prompt = """