#Unable to fetch Recipe using getRecipeFromMistral Function in the ReactJS Course.

20 messages · Page 1 of 1 (latest)

tacit nacelle
#

Hello Team,
I am following this course/lesson https://scrimba.com/learn-react-c0e/~0zg2. Here the getRecipeFromMistral doesnt work for me.
Pls note i have set the HF_ACCESS_TOKEN env variable and can also console log it. Also i have upated latest model ( model: "mistralai/Mixtral-8x7B-Instruct-v0.1", )
However i get the below error. Any help is appreciated.

I get !Failed to fetch as error.

grizzled jungle
#

Are you using the correct import?

import { HfInference } from '@huggingface/inference'

tacit nacelle
#

Yes. Infact this script is provided by the instructor and no manual changes have been done to it.

cursive remnant
#

try to use next model in the ai.js function of mistral:
model: "katanemo/Arch-Router-1.5B",

outer depot
#

using the "katanemo/Arch-Router-1.5B", as suggested by @cursive remnant worked for me (combining with upgrading the huggingface/inference package). Thanks

near rune
#

Hi, I'm having the same issue 😭

#

I tried changing the model as suggested by @cursive remnant in the ai.js function, it's still not working. Do we have to be running it locally for this to work? I'm doing it within scrimba.

near rune
#

Tried running it locally, I get a "CORS Missing Allow Origin" error

outer depot
#

Since working with AI is not the purpose of this course, I think we can legitimately edit ai.js to return a hardcoded markdown string, as a workaround.

near rune
#

@outer depot Thanks, will do that!

spiral heron
#

I have just discovered this error using the "mistralai/Mixtral-8x7B-Instruct-v0.1" model Bob setup. Checking network error logs in Chrome, there is a request but the response is:

"The requested model 'mistralai/Mixtral-8x7B-Instruct-v0.1' is not a chat model."

So I guess the model has changed.

#

I just changed to "katanemo/Arch-Router-1.5B" and the request worked and I got a response back, although it's just a one liner and not accurate as you don't make carbonara with ground beef 😉

"Sure! How about making spaghetti carbonara? It's a classic Italian dish that you can easily make with just the ingredients you mentioned."

spiral heron
icy eagle
#

hello team, I'm also get stacked on this challenge getRecipeFromMistral doesnt work for me.
can somebody help me with it?

spiral heron
earnest stump
#

Happy new year devs,

I get a syntax error on the get Recipe task but cant find it anywhere in the code. can you help?

spiral heron
icy eagle
earnest stump
earnest stump