Open mattjames1978 opened 11 months ago
other errors of interest, note using Chat GPT Model version 0301 and API verson 2023-07-01-preview due to location constraints and need to deploy to West Europe. 0613 not available in WEU.
2023-10-10T11:50:07.986027963Z raise self.handle_error_response( 2023-10-10T11:50:07.986031463Z openai.error.InvalidRequestError: Unrecognized request argument supplied: functions
2023-10-10T12:19:25.599143198Z [2023-10-10 12:19:25 +0000] [77] [ERROR] Exception in ASGI application 2023-10-10T12:19:25.599185098Z Traceback (most recent call last): 2023-10-10T12:19:25.599190698Z File "/tmp/8dbc983f225d8ca/antenv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
Hi @mattjames1978 I am also facing the same issues, I also deployed the application using 0301 and api version 2023-07-01. And the deployed app was able to respond in ask approach and no response in chat approach
@suma-sai-paluri ok thanks, interesting, so we think it is related to the GPT model version we are using 0301. Thanks, hopefully Pamela and the team will come back with a solution for us. thanks
@suma-sai-paluri here is something I have tried which has resolved it. Comment out the functions in here
chatreadretrieveread.py
Also changed the API version to openai.api_version = "2023-05-15" in app.py Think this is not needed though as tried it without and still works.
It maybe that the 0301 model doesn't support the functions being called.
Give it a try I am not getting correct responses.
Thank you @mattjames1978 , i can now get the responses ,but i am curious to understand how and why are these functions useful and what are the repercussions of eliminating them.
@suma-sai-paluri yes definitely, let's leave this issue open and wait for feedback :)
Our Bicep file now creates models with version 0613- https://github.com/Azure-Samples/azure-search-openai-demo/blob/7b2e88733f1557aa5480f0b1324aee73ac4e2845/infra/main.bicep#L60
It is no longer possible to deploy 0301 version models anymore, so presumably you created it a while ago.
It's probably fine to not use functions for the query generation, but we may want to use functions for more aspects of the process as well, since it can add more structure to responses. For example, we may use functions to get follow-up questions returned in a more consistent format.
Could you update to 0613? That would enable you to use functions in this case and also future uses.
Yes, function call is not supported in 0301. Default Model version in repo is 0613 and funcation call is enabled by default. To disable it use funcation_call='none' https://github.com/Azure-Samples/azure-search-openai-demo/blob/7b2e88733f1557aa5480f0b1324aee73ac4e2845/app/backend/approaches/chatreadretrieveread.py#L127C1-L128C1
Hi @pamelafox, yes we have been using model version 0301 for a while as our organisation can only deploy to West Europe region in a Azure. So will disable the function until 0613 becomes available in West Europe our primary region. Does any one know when this will become available? I have asked Our MS DSE to find out for us.
Thanks
Thank you @pamelafox and @srbalakr for your responses
Thank you all for the responses. I've tried all the solutions listed up here, but i'm still stuck with the error. ( i have changed the API version to openai.api_version = "2023-05-15" in app.py , updated the Bicep file version to 0613, commented out the functions in chatreadretrieveread.py) I wonder if anyone has the same issue with me.
hi @hyondi try changing the openai.api_version = "2023-05-15" in predocs.py also and check the model which you are using ,because in some regions the 0613 isn't available yet. If you have access to gpt 3.5 turbo 0301 only like me ,try changing the model version to 0301 in main.bicep file.
@hyondi Can you share the full traceback from the logs for your error? You may be experiencing a different issue than the other developers in the thread. Any OpenAI-related issue can result in "TypeError: Cannot read properties of undefined (reading '0') error from chat completion"
@suma-sai-paluri here is something I have tried which has resolved it. Comment out the functions in here
chatreadretrieveread.py
Also changed the API version to openai.api_version = "2023-05-15" in app.py Think this is not needed though as tried it without and still works.
It maybe that the 0301 model doesn't support the functions being called.
Give it a try I am not getting correct responses.
This fixed my issue, thank you so much! However, now my Citation page is always showing:
Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Does this happen to you to?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Ask a question and submit on chat with your data page. Error in response. When clicking on ask a question the completion and response is received ok from data. Not sure what the issue is, logs below
Any log messages given by the failure
2023-10-10T10:05:43.174373581Z [41m[30mfail[39m[22m[49m: Middleware[0] 2023-10-10T10:05:43.174412381Z Failed to forward request to http://169.254.130.33:8000. Encountered a System.IO.IOException exception after 1767.901ms with message: The response ended prematurely.. Check application logs to verify the application is properly handling HTTP traffic.
Expected/desired behavior
OS and Version?
azd version?
Mention any other details that might be useful