Ao executar o arquivo main.py conforme na aula é solicitado, recebi o seguinte erro:
Digite um caso de uso: Ana deseja realizar login na plataforma AcordeLab
Apagando arquivos gerados...
Traceback (most recent call last):
File "C:\Users\user\Desktop\dados salvo\Documents\automacao\LangChain\python\alura\otimizando-desenvolvimento-testes-com-IA\main.py",
line 15, in main
assistente = criar_assistente(lista_ids_arquivos=lista_ids_arquivos)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\Desktop\dados salvo\Documents\automacao\LangChain\python\alura\otimizando-desenvolvimento-testes-com-IA\assistente_projeto.py", line 24, in criar_assistente
assistente = cliente.beta.assistants.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\Desktop\dados salvo\Documents\automacao\LangChain\python\alura\otimizando-desenvolvimento-testes-com-IA\curso_3_openai\Lib\site-packages\typing_extensions.py", line 3004, in wrapper
return arg(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
TypeError: Assistants.create() got an unexpected keyword argument 'file_ids'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\Desktop\dados salvo\Documents\automacao\LangChain\python\alura\otimizando-desenvolvimento-testes-com-IA\main.py",
line 41, in <module>
main()
File "C:\Users\user\Desktop\dados salvo\Documents\automacao\LangChain\python\alura\otimizando-desenvolvimento-testes-com-IA\main.py",
line 35, in main
apagar_assistente(assistente_id=assistente.id)
^^^^^^^^^^
UnboundLocalError: cannot access local variable 'assistente' where it is not associated with a value
As versões que estou utilizando são:
Package Version
------------------ -----------
annotated-types 0.7.0
anyio 4.13.0
attrs 26.1.0
certifi 2026.4.22
cffi 2.0.0
charset-normalizer 3.4.7
colorama 0.4.6
distro 1.9.0
faiss-cpu 1.13.2
h11 0.16.0
httpcore 1.0.9
httpx 0.28.1
idna 3.14
jiter 0.14.0
numpy 2.4.4
openai 2.36.0
opencv-python 4.13.0.92
outcome 1.3.0.post0
packaging 26.2
pip 26.1.1
pycparser 3.0
pydantic 2.13.4
pydantic_core 2.46.4
PySocks 1.7.1
python-dotenv 1.2.2
regex 2026.5.9
requests 2.33.1
selenium 4.43.0
setuptools 65.5.0
sniffio 1.3.1
sortedcontainers 2.4.0
tiktoken 0.12.0
tqdm 4.67.3
trio 0.33.0
trio-websocket 0.12.2
typing_extensions 4.15.0
typing-inspection 0.4.2
urllib3 2.7.0
websocket-client 1.9.0
wsproto 1.3.2
O projeto está no repositório.