anything-llm icon indicating copy to clipboard operation
anything-llm copied to clipboard

Microsoft Azure OpenAI error

Open Mirgiacomo opened this issue 1 year ago • 2 comments

Hi,

When I try to use Azure OpenAI I get this error. What could it be? I get this error from console: TypeError: this.openai.streamChatCompletions is not a function

image image

image

Mirgiacomo avatar Jan 11 '24 10:01 Mirgiacomo

Can you verify the following?

  • How are you running AnythingLLM (local dev, docker, docker on remote machine, etc)

  • What tag & digest hash (if on Docker) or commit is your running instance of AnythingLLM is on?

timothycarambat avatar Jan 11 '24 19:01 timothycarambat

connect #518

If you are behind 75dd86967c661ef6f883fe5f03c66d6bb823b234 then this explains why. We bumped Azureopenai from 1.0.0-beta.3 => ^1.0.0-beta.101

streamChatCompletion was not a function on the @azure/openai package on the previous .3 version. I have a feeling you are on local development and pulled in the latest, but did not update the packages post-pull.

cd into frontend collector and server and run yarn in each folder to ensure you have all the latest packages that AnythingLLM requires.

timothycarambat avatar Jan 11 '24 19:01 timothycarambat

I confirm what you said, I had the updated sources but had not updated the libraries. Now Azure OpenAI is working properly. Thank you

Mirgiacomo avatar Jan 12 '24 07:01 Mirgiacomo