Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping agent returns JSONDecodeError: Expecting value: line 1 column 1 (char 0) #52

Closed
caufieldjh opened this issue Aug 13, 2024 · 0 comments · Fixed by #54
Closed

Comments

@caufieldjh
Copy link
Member

The Match function (c/o the Mapping agent) raises a JSONDecodeError on all inputs.
In the app, using input text like "fever" and relevant fields of label, definition with an ont_hp collection raises this:

2024-08-13 17:50:21.052 Uncaught app exception
Traceback (most recent call last):
  File "/home/harry/curate-gpt/.venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
    result = func()
  File "/home/harry/curate-gpt/.venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
    exec(code, module.__dict__)
  File "/home/harry/curate-gpt/src/curate_gpt/app/app.py", line 317, in <module>
    results = mapper.match(
  File "/home/harry/curate-gpt/src/curate_gpt/agents/mapping_agent.py", line 141, in match
    for m in json.loads(response_text):
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@caufieldjh caufieldjh linked a pull request Aug 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant