Giter Site home page Giter Site logo

ievangelist / blazor-azure-openai Goto Github PK

View Code? Open in Web Editor NEW
91.0 9.0 17.0 4.25 MB

The Blazor WebAssembly app that inspired the Microsoft //Build 2023 demo app.

Home Page: https://davidpine.net/blog/dotnet-async-enumerable/

License: MIT License

HTML 24.10% C# 68.11% CSS 5.42% JavaScript 2.38%
azureai blazor blazor-webassembly csharp dotnet openai

blazor-azure-openai's Introduction

Blazor ๐Ÿ’œ OpenAI

All Contributors

build & test localization

Getting Started

Note To run this example, you'll need an Azure subscription with access enabled for the Azure OpenAI service. You can request access here. You can also visit here to get some free Azure credits to get you started.

This example relies on three environment variables:

setx AzureOpenAI__ApiKey "<Your Azure OpenAI API Key>"
setx AzureOpenAI__Endpoint "<Your Azure OpenAI API endpoint>"
setx AzureOpenAI__DeploymentId "<Your Azure OpenAI deploymend id>"
export AzureOpenAI__ApiKey="<Your Azure OpenAI API Key>"
export AzureOpenAI__Endpoint="<Your Azure OpenAI API endpoint>"
export AzureOpenAI__DeploymentId="<Your Azure OpenAI deploymend id>"

Home screen

Home screen

Voice chat screen

Voice chat screen

Voice chat screen with navigation menu collapsed

Voice chat screen with navigation menu collapsed

Text-to-speech preferences dialog displayed

Text-to-speech preferences dialog

Example response text

Example response text

Example response text continued 2/4

Example response text continued

Example response text continued 3/4

Example response text continued

Example response text continued 4/4

Example response text continued

Contributors โœจ

Thanks goes to these wonderful people (emoji key):

Hussein Beygi
Hussein Beygi

๐Ÿ’ป ๐Ÿค”
github-actions[bot]
github-actions[bot]

๐ŸŒ ๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

blazor-azure-openai's People

Contributors

allcontributors[bot] avatar github-actions[bot] avatar husseinbeygi avatar ievangelist avatar imgbot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blazor-azure-openai's Issues

Make The Demo Multilingual

Since the demo is often for business people and not everybody knows English, the idea is to make the demo multilingual, this way everybody can explore the power of Azure OpenAI in their language.

chat and image in same prompt window

any suggestions as to how we can get chat responses and image responses in the same prompt window and session? since they have different endpoints and clients?

Blazor localization in a razor library

We have a Blazor web application that has the Localization App Toolkit setup and working. Now we have moved some of the controls to a razor library to allow them to easily be shared by more solutions. I was able to configure the Localization for the library, but not able to get the localization to pick up the values for the library. We are interested in this approach to keep everything encapsulated in the library. Any suggestions to get this to work would be appreciated.

Issue with IJS Runtime

Hello, I am encountering a problem with setting up a Blazor Web App project (Interactive Auto) .NET8. I get this error message:
InvalidOperationException: Cannot resolve scoped service 'Microsoft.JSInterop.IJSRuntime' from root provider.

I call my component in a client-side page and initialize the rest in Program.cs.

Do you have any suggestions for troubleshooting this issue?

Emoji from stream response isn't displayed as its Unicode literal

The receiving end (Blazor Client app) needs to handle its buffering logic better. Currently, there is a bug where character escape sequences for Unicode characters are parsed as multi-character strings rather than individual characters. The following code needs to determine if the next char from the (char)reader.Read(); is 'u', if so, this means that the next four char will make up the full Unicode representation. For emoji to render correctly, we'll need to construct these six char values into a single char value.

if (partialResponse is '\\')
{
isEscapeSequence = true;
continue;
}

Psuedo-code:

  • If the next char is 'u', treat the '\u' as the start of the Unicode sequence.
  • Then read the next four char from the reader
  • Convert this into a single Unicode char.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.