Build Storefront AI Agent using Open AI

I am building a Storefront AI agent chatbot in Shopify using a theme block extension.
I am following this documentation:

However, the guide focuses on using Claude AI. I want to use OpenAI instead.
Can you tell me what code I need to change to make it work with OpenAI?

Can anyone help me?

Hey @amit_kumar1

You can find instructions to swap out the LLM in the documenation here

how can we deploy this chatbot to live store? I’ve built it locally also installed on live store, but its not working directly. To publish this app on our store what should we need to do ?

Hey @awais, we have a guide here on how to deploy your app to a hosting service:

1 Like

Thanks alot @KyleG-Shopify , actually I was trying this ai agent app on my dev store and the chatbot was not working might be due to cors or something so for testing I am planning to deploy.

the app is running locally but its still not responding: