Closed vikramhn closed 1 year ago
It seems an error related to lack of "OPENAI_EMBEDDINGS_ENGINE_QUERY" model in your Azure OpenAI resource. Please double-check check the models are correctly deployed in your resource and move to "text-embedding-ada-002" for bot Doc and Query if it's available in your region.
Attached the error, hope you can tell me what it could be?
RetryError: RetryError[<Future at 0x7c5cdb2d1460 state=finished raised InvalidRequestError>] Traceback: File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "/usr/local/src/myscripts/OpenAI_Queries.py", line 70, in
st.session_state['prompt'], st.session_state['response'] = utils.get_semantic_answer(df, question, model=model, engine='davinci', limit_response=st.session_state['limit_response'], tokens_response=st.tokens_response, temperature=st.temperature)
File "/usr/local/src/myscripts/utilities/utils.py", line 50, in get_semantic_answer
res = search_semantic_redis(df, question, n=3, pprint=False, engine=engine)
File "/usr/local/src/myscripts/utilities/utils.py", line 34, in search_semantic_redis
embedding = get_embedding(search_query, engine= os.getenv('OPENAI_EMBEDDINGS_ENGINE_QUERY', f'text-search-{engine}-query-001'))
File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 326, in wrapped_f
return self(f, *args, **kw)
File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 406, in call
do = self.iter(retry_state=retry_state)
File "/usr/local/lib/python3.9/site-packages/tenacity/init.py", line 363, in iter
raise retry_exc from fut.exception()