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

No error handling around empty messages #36

Open
spocksbrain opened this issue May 11, 2024 · 1 comment
Open

No error handling around empty messages #36

spocksbrain opened this issue May 11, 2024 · 1 comment

Comments

@spocksbrain
Copy link

I have also run across this error a number of times.

Traceback (most recent call last):
File "C:\Users\Spocksbrain\Documents\Code_Projects\maestro\maestro.py", line 246, in
sub_task_result = haiku_sub_agent(sub_task_prompt, search_query, haiku_tasks, use_search)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Spocksbrain\Documents\Code_Projects\maestro\maestro.py", line 117, in haiku_sub_agent
haiku_response = client.messages.create(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Spocksbrain\Documents\Code_Projects\maestro\maestor01\Lib\site-packages\anthropic_utils_utils.py", line 277, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Spocksbrain\Documents\Code_Projects\maestro\maestor01\Lib\site-packages\anthropic\resources\messages.py", line 681, in create
return self._post(
^^^^^^^^^^^
File "C:\Users\Spocksbrain\Documents\Code_Projects\maestro\maestor01\Lib\site-packages\anthropic_base_client.py", line 1239, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Spocksbrain\Documents\Code_Projects\maestro\maestor01\Lib\site-packages\anthropic_base_client.py", line 921, in request
return self._request(
^^^^^^^^^^^^^^
File "C:\Users\Spocksbrain\Documents\Code_Projects\maestro\maestor01\Lib\site-packages\anthropic_base_client.py", line 1019, in _request
raise self._make_status_error_from_response(err.response) from None
anthropic.BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages: text content blocks must be non-empty'}}
PS C:\Users\Spocksbrain\Documents\Code_Projects\maestro>

@awm19delta
Copy link

awm19delta commented May 30, 2024

I'm having this same issue repeatedly, trying to tweak the code but my skills are limited. It happens if there is no continuation prompt and/or when the orchestrator goes back to the sub-agent (I think). I can't seem to get past it.

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

No branches or pull requests

2 participants