DEV Community

Cover image for Creating a Custom Chatbot with OpenAI APIs | Blazor and .NET MAUI Integration (Workshop Show Notes)
Lucy Muturi for Syncfusion, Inc.

Posted on • Originally published at syncfusion.com on

Creating a Custom Chatbot with OpenAI APIs | Blazor and .NET MAUI Integration (Workshop Show Notes)

This blog provides show notes for our August 22, 2024, workshop, “Creating a Custom Chatbot with OpenAI APIs | Blazor and .NET MAUI Integration.” The workshop was presented and hosted by Syncfusion Product Manager Michael Prabhu M. It was ideal for beginners and enthusiasts who wanted to explore AI-driven file search and gain insights into cross-platform integration with .NET MAUI.

Overview

In this workshop, we provided an immersive look at how to build a custom chatbot using OpenAI APIs, starting with Blazor and extending to a .NET MAUI Blazor hybrid app.

Agenda

  • Create a vector store: Learn how to build and manage a vector store to handle file data efficiently.
  • Develop an AI assistant: Implement an AI-powered assistant capable of intelligent file search and response generation.
  • Upload files: Upload and index files in your vector store for enhanced search capabilities.
  • Link threads: Create and manage conversation threads to improve interaction and context understanding.
  • Integrate with .NET MAUI: See how to access and reuse your Blazor-based chatbot in a .NET MAUI Blazor hybrid app, combining the best of both technologies.

On-demand version

Missed our live workshop? No worries! Sign up now to access the on-demand session and watch it at your convenience.

This workshop provides hands-on experience building apps using Syncfusion Blazor components. Please ensure you have access to these components before starting the webinar recording.

Follow the instructions in this link to generate a free trial license key: License Key Generation.

Follow the instructions in this link to create your OpenAI secret key: API Keys—OpenAI API.

Q&A

Q: Are there any disadvantages to choosing .NET 8?

A: No, we don’t see any disadvantages in .NET 8.

Q: Once the app is completed, how do you publish it through a Docker image?

A: Publishing in Docker should be easy once you have completed the app using our documentation. We will try to create a YouTube video for this.

Q: Where can we find the other strings to use different OPENAI_MODELs?

A: In the documentation, I have used ChatGPT 3.5 Turbo and GPT 4 models. You can view these APIs at https://platform.openai.com/docs/models.

Q: So, I would switch the endpoint if I want to start fresh again without context, correct?

A: Yes, you should switch the endpoint. You can check the available endpoints at this OpenAI link.

Q: I see the document on GitHub. Are you planning on having an example on GitHub for us to download?

A: Yes, we will soon add this to our GitHub repo, but we cannot set a date for that.

Q: So, this can also allow me to create multiple assistants in the chat?

A: Yes, you can create multiple assistants in the chat.

Q: I just got caught up. Where do we get the file restaurant_menu.txt?

A: It is available in this GitHub link.

Q: Do we face file ownership issues still?

A: No, we don’t face any file ownership issues.

Q: Can Markdown support be added to the chat?

A: Yes, you can add Markdown support. When we deserialize the JSON, we can add code accordingly to evaluate the Markdown.

Q: Can the search work with DB and or Excel?

A: Yes, the search will also work for DB and Excel.

Q: Can you recommend any particular vector store?

A: We don’t recommend a specific database, but any vector database should be compatible.

Q: Do you have a specific YouTube channel or videos with other tutorials?

A: Yes, we do. Please check out the Syncfusion channel. If you do not find the tutorial you are looking for, let us know in the comments. We always take suggestions.

Summary

During this workshop, we demonstrated how to build a custom chatbot using OpenAI APIs. We hope you enjoyed it. Please watch for our future Blazor and .NET MAUI workshops and webinars.

Recommended resources

Top comments (0)