Hey all, I keep getting an error in trying to get the run status of a thread.
Here is my call: run_status = client.beta.threads.runs.retrieve(thread.id, run.id)
Here is the error: run_status = client.beta.threads.runs.retrieve(thread.id, run.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Runs.retrieve() takes 2 positional arguments but 3 were given
I checked and there are values for both thread.id and run.id, and I’m only passing those two arguments, so I’m kind of at a loss.
Bonus, I’m using the gpt-4-1106-preview model (128K context I thought) but if I pass in content greater than 32768 characters I get the following error-
ile “D:<directory>.venv\Lib\site-packages\openai_base_client.py”, line 877, in _request
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {‘error’: {‘message’: ‘1 validation error for Request\nbody → content\n ensure this value has at most 32768 characters (type=value_error.any_str.max_length; limit_value=32768)’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: None}}
I also see 32K limit error on my runs even though I select gpt-4-1106-preview model: raise self._make_status_error_from_response(err.response) from None openai.BadRequestError: Error code: 400 - {'error': {'message': '1 validation error for Request\nbody -> content\n ensure this value has at most 32768 characters (type=value_error.any_str.max_length; limit_value=32768)', 'type': 'invalid_request_error', 'param': None, 'code': None}}
can you please tell me (if you got it solved) how you also got that solved?
To may knowledge that hasn’t been resolved yet. So in practice, with the API, there is a 32K input limit. 128k is a unicorn for now I’ve heard of other limitations still out there, my use case is pretty narrow so I haven’t bumped into them.
The character limitation is specific to assistants and specific to chat threads and instructions. It does not apply to the retrieval from uploaded files that the AI does on its own.
If you don’t want to engage in OpenAI’s multiple limitations with assistants, you can instead use ChatCompletion endpoint to interact directly with AI models.
It (32K limit error) still hasn’t been resolved… wondering if it’s going ever or by design for some unknown reason, which is odd as it should match the selected model specs.