Generative AI into ANY .NET App with SemanticKernel

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 104

  • @nitrovent
    @nitrovent 6 місяців тому +2

    The most fascinating feature of the semantic kernel for me was the kernel plugins that allow you to give the AI access to local function to reach the goal you specify in chat.
    You decorate your plugin functions with a description in plain text and the semantic kernel uses it to orchestrate function calls.
    This way you can access local data that is highly dynamic (local time, user's todo list, whatever) but it will also call functions to create content or control the app. That really blew my mind.

  • @Azagatoth
    @Azagatoth 6 місяців тому +49

    Ideally I would want to have a local LLM with our training material/documentation, so the users can access that

    • @HenningKilset76
      @HenningKilset76 6 місяців тому +1

      You can have a remote LLM and use the rag pattern to make the LLM aware of relevant documents based on user queries.

    • @Azagatoth
      @Azagatoth 6 місяців тому +3

      ​​@HenningKilset76
      Remote LLM is not an option. We have customers that are completely off the grid due to security.

    • @HenningKilset76
      @HenningKilset76 6 місяців тому

      Ok - get that. A combination of Semantic Kernel and Kernel Memory can connect to and utilize for instance a local Llama or Phi model as well.

    • @georgepagotelis
      @georgepagotelis 6 місяців тому

      The answer you're looking for is Microsoft Copilot 365 (only seen demo online) and there's an copilot developer kit you can "buy" ie. another 100 subscription and do exactly that. Was thinking this while watching too btw.

    • @francoislepron2301
      @francoislepron2301 6 місяців тому

      Is it possible with Mistral and train it with my data ?

  • @paulguk
    @paulguk 6 місяців тому +33

    Would be interested in follow up videos that explore interacting with data (eg via SQL) to obtain data relevant to questions asked by the user.

    • @MaQy
      @MaQy 6 місяців тому +1

      Semantic Kernel makes it easy to use RAGs with Azure Search and other DBs. You can also build chat completion tools that the model can choose to call. The example you are going to find everything is a tool that provides the weather.

  • @HenryETaylor
    @HenryETaylor 6 місяців тому +2

    Directly exposing AI features to my customers would only make sense if it generated higher revenues from existing clients or accelerated the sales cycle (allowing me to grow a bigger customer base), but integrating AI features into the tools I write for myself to generate synthetic data, categorize and analyze server traffic and cloud costs... Yes! That I will start doing immediately!

  • @alfany6252
    @alfany6252 6 місяців тому +47

    It would be better if you told about running local LLM with C#

    • @nickchapsas
      @nickchapsas  6 місяців тому +78

      It’s coming

    • @KibbleWhite
      @KibbleWhite 6 місяців тому

      @@nickchapsas Yes please buddy, loving this insight so far! 💖

    • @irql2
      @irql2 6 місяців тому +3

      Its very easy, just get LM Studio. It exposes an API endpoint you can call in C#. This is what Nick will probably show in the next video because its the easiest to do by far imo.

    • @alfany6252
      @alfany6252 6 місяців тому

      @@irql2 I want it to be only in my app. I dont want to run other program, run server...

    • @maskettaman1488
      @maskettaman1488 6 місяців тому +4

      It wouldn't be "better", running locally is a totally different scenario for a totally different use case.

  • @RoySalisbury
    @RoySalisbury 6 місяців тому +4

    Would be cool to see a demo on feeding it some SQL table creation statements or some c# objects (perhaps your MovieDB example) and have it generate the code for you. Then ask it to do thinks with the code like "Add the necessary error handling".

  • @danclarkeuk
    @danclarkeuk 6 місяців тому +13

    Nice. I've got some dotnet code that's interacting with OpenAI via their REST API - but I might convert that over to Semantic Kernel after seeing this.

    • @danclarkeuk
      @danclarkeuk 6 місяців тому +5

      Well that was easy! I've just converted it over and it took about 5 minutes and just worked! Thanks for the video! 😊🙏

    • @vincenthamelin6115
      @vincenthamelin6115 6 місяців тому

      @@danclarkeuk Although your post is relatively new, have you seen a cost difference? I've read that using Azure OpenAI Service is MORE expensive than using OpenAI APIs directly. What are your thoughts?

    • @danclarkeuk
      @danclarkeuk 6 місяців тому +3

      @@vincenthamelin6115 Ah sorry - I probably wasn't clear about what I'd changed. I haven't switched to the Azure OpenAI service. I just changed my implementation from talking to OpenAI manually via their REST API, to instead using the Semantic Kernel nuget package.

    • @elpe21
      @elpe21 4 місяці тому

      @@vincenthamelin6115 2 months from your message so not sure if something has changed or not, but it looks like prices are the same . The difference is, Azure page shows prices per 1000 tokens whereas OpenAI page shows per 1_000_000. After watching this video started to think about similar change as @danclerkeuk

  • @zachemny
    @zachemny 6 місяців тому +1

    Also an example of embedding documents with SK into a local model would be very interesting.

  • @romanstefanov8627
    @romanstefanov8627 8 днів тому

    Hi, Nick, are there any plans to make a video about Process Framework?

  • @dinamohamed13600
    @dinamohamed13600 5 місяців тому

    Thank you , waiting for other AI videos

  • @tyomidi
    @tyomidi 6 місяців тому +1

    Would have been cool it is was with Llama but I dont see any good way with Dotnet?

  • @nick066hu
    @nick066hu 6 місяців тому +5

    Is there any reason why should we use OpenAI thru Azure ? The Open AI api is also directly available.
    Can someone with some experience with both pls help me compare these two approaches: Pro/Con /Pricing

    • @DaminGamerMC
      @DaminGamerMC 6 місяців тому +3

      I have some experience with Azure Open AI. By itself it is also very very cheap. However, as soon as you want to add you own data (like for making a support service for a company) it gets very expensive because you need AI search.
      A big issue is that you need to be allowed to use the service by Microsoft meaning you might have to wait between a week and a month to really be able to use it.

    • @MetehanG
      @MetehanG 6 місяців тому +2

      For my scenario, my company already has access to Azure and we have some free monthly Azure credits. These credits also available on Azure Open AI so it was basically free for us. Why would we pay for OpenAI API while we have that? Other than that, there is practically no difference as far as I know.

    • @ThaGuus
      @ThaGuus 6 місяців тому +3

      Pro of Azure OpenAI: Runs on Azure so more "secure", Already known SLA, VNET support & private endpoints, if you want to "train it" then the files are on Azure which is a pre.
      Con of Azure OpenAI: You need to have a business Azure Account with domain and request access, Streaming doesn't work fully like it will stream in parts but not letter for letter like the normal OpenAI API, It's slower

    • @PticostaricaGS
      @PticostaricaGS 6 місяців тому +2

      Azure OpenAI is designed having data security in mind. And has easy integration with other Azure AI services. So, for companies internal tools, Azure OpenAI is more suitable.

    • @nick066hu
      @nick066hu 6 місяців тому

      Thank you to all who replied and also those who are going to. For a proof of concept evaluation I might try the direct OpenAI api first. (I am not very experienced in programming Azure, learning two things at a time might be unnecessarily steep, although the free monthly credits are also tempting)
      My end goal is to program a technical support service assistant, with knowledge from uploaded manuals and other documents. First in a chat-window text based, in some later phase in voice mode.
      @DaminGamerMC What do you mean by 'allowed ....and wait a week/month' ?
      Am I right with assuming, that in this scenario I pay for the uploaded (they call it 'embedded', if I got it right) documents, - I need these the AI assistant find the replies in -, only once, per tokens in the document, and for all subsequent (customer) queries I pay only for the tokens actually in the query and the replies?

  • @Rajeshsingh-ws5th
    @Rajeshsingh-ws5th 2 місяці тому

    I think you forgot to mention prerequisite that one should have Azure AD work or school account to use it not personal account like any hotmail or gmail? Please respond.

  • @lucaciandrei
    @lucaciandrei 6 місяців тому +58

    Interesting, but costly.

    • @LoganDunning
      @LoganDunning 6 місяців тому +20

      Agreed, calling Open AI Apis ditectly is HUGE cost savings compared to Azure Open AI.

    • @cheronecom
      @cheronecom 6 місяців тому +5

      I should note, ollama doesn't require a GPU, but you will want to use a small model if you use CPU - like tinyllama or phi3:mini

    • @geraldmaale
      @geraldmaale 6 місяців тому

      @@LoganDunning Check again, both are the same. (input = $0.005/1k tokens, output = $0.15/1k tokens)

    • @rogeriobarretto
      @rogeriobarretto 6 місяців тому +4

      It all depends on the underlying AI Service you want to use, SK works as an abstraction regardless of the service you are using. So if you decide to use it for Local Models you have virtually has no cost.

    • @HenningKilset76
      @HenningKilset76 6 місяців тому

      @@LoganDunning It's the same price. GPT-4o 1.5 cents / 1000 input tokens and 3 cents / 1000 output tokens.

  • @TheMannihilator
    @TheMannihilator 6 місяців тому +3

    Thank you for the demo. Maybe you could use another LLM instead of OpenAI stuff.

  • @flybyw
    @flybyw 5 місяців тому

    I was expecting to see Nick discovering that "Nick: " is not in the loop, but he Ctrl+C'ed early every time.

  • @craigmcinnes1212
    @craigmcinnes1212 6 місяців тому +7

    Maybe I have this VERY wrong, but what has this to do with Semantic Kernel? I thought SK was about providing automation to an AI, so that it could invoke functionality within your app. example, my app is a ride booking service, so I provide a "request ride" "feature" and now the general AI knows about that specific "ability" and how to invoke it within my app during a general chat style session?

    • @etiennebaudoux135
      @etiennebaudoux135 6 місяців тому +2

      You can do exactly this with Semantic Kernel, but Nick only scratches the surface and likely focused on the basic ChatGPT conversation because that's probably what people are the most familiar with when it comes to AI nowadays.

    • @irql2
      @irql2 6 місяців тому

      Honestly all of that can be done without the Semantic kernel. You can define functions in your app and tell the LLM they're available to call. They call it "Function calling" because they're really good at creatively naming stuff lol.

  • @jorgeserrano4226
    @jorgeserrano4226 6 місяців тому

    @Nick can we use same code when targeting OpenAI instead of AzureOpenAI ? if not, what would be the diffrence ?

  • @bogdanbanciu1781
    @bogdanbanciu1781 6 місяців тому

    I also posted a tweet about the behavior of await foreach while building an API to do some AI work. Did you try using await Task.Yield() instead of the Delay(100)? Something fishy is happening over there

  • @mingyingxue6815
    @mingyingxue6815 6 місяців тому

    hi, Nick, what is the ide you used in this video? tkx

  • @davestorm6718
    @davestorm6718 4 місяці тому

    How would you code this to upload an image to AzureAI or ChatGPT and have it process the image?

  • @Grumpicles
    @Grumpicles 6 місяців тому +1

    That's great. But how much does it cost?

  • @sergeyz.5845
    @sergeyz.5845 6 місяців тому +1

    didn’t know about that lib. Thank you

  •  Місяць тому

    why use azure? Why don't you go straight to the source: the openAI apis? I will probably have a project integrating Open AI, Whatsapp and a ERP. I will need to keep the state of the GPT conversation with multiple users... Hope I manage to do the task. If you have any hints, I would appreciate that

  • @Chatlan
    @Chatlan 6 місяців тому

    Thanks for the video. It would be interesting to see how to use RAG as well

  • @francescogranozio2780
    @francescogranozio2780 6 місяців тому

    could you make a video that shows the “chat with your files” feature?

  • @igorsolomatov4743
    @igorsolomatov4743 6 місяців тому

    Why not use existing ai agent frameworks here? I think the most critical is how do we get grounding of ai. For example I want it to be able to run my functions. So that it will actually integrate

  • @lynndemarest1902
    @lynndemarest1902 19 днів тому

    Does this replace langchain?

  • @alexanderpoplooukhin7448
    @alexanderpoplooukhin7448 6 місяців тому

    What's a benefit to use chatgpt through MS Azure instead of using chatgpt's API?

    • @elpe21
      @elpe21 4 місяці тому

      Was wondering the same. Looks like MS is not specyfing any limits on requests / token per minute

  • @Kotz_en
    @Kotz_en 6 місяців тому

    Does this work with Ollama, or is it just Azure?

    • @Luke-me9qe
      @Luke-me9qe 6 місяців тому

      Yes. You would need another connector. And it is available

  • @Craxmerax
    @Craxmerax 6 місяців тому

    How would I use this to stream the response to a frontend application and get the same sort of feel where the chat bot is writing in the response like in the CLI?

    • @ferd1775
      @ferd1775 6 місяців тому

      Yield return

    • @ferd1775
      @ferd1775 6 місяців тому

      You could also use llama3 locally and ask it 😉

    • @neociber24
      @neociber24 6 місяців тому

      AsyncIterator?

    • @ferd1775
      @ferd1775 6 місяців тому

      @@neociber24 oh yea. Forgot all about that, I have no use for it generally. Way better solution

  • @Sztormus
    @Sztormus 6 місяців тому +2

    Cool video as always! But now we want a stream from World of Warcraft 😂

    • @nickchapsas
      @nickchapsas  6 місяців тому +2

      This has happened already when Dragonflight launched 😂

    • @JustArion
      @JustArion 6 місяців тому +1

      @@nickchapsas Nick the Gamer. Would love to see more of those

  • @shabanelmogy7912
    @shabanelmogy7912 6 місяців тому

    we need big tutorial about blazor and what your opinion in it ?

  • @shikhartomar1459
    @shikhartomar1459 5 місяців тому

    You might want to add line 32 and 33 in the while loop to have a conversation else it will take previous input as next prompt.

    • @elpe21
      @elpe21 4 місяці тому

      Not sure if I understand this, however you want to resend the history to keep the context otherwise it will loose it.

  • @KarmCraft
    @KarmCraft 6 місяців тому +1

    How to add your domain logic/knowledge?

    • @nickchapsas
      @nickchapsas  6 місяців тому +1

      I’ll show that in a future video but it gets pricy

    • @irql2
      @irql2 6 місяців тому +1

      @@nickchapsas Will be interesting to see what you mean by pricy. The technology to do it is openly available.

  • @davidjsutherland
    @davidjsutherland 6 місяців тому

    We live in a wild and crazy time.

  • @FraserMcLean81
    @FraserMcLean81 6 місяців тому

    I've been playing around with Azure Open AI but was just using the Azure.AI.OpenAI packages. Didn't know about this Symantic kernel thing.

    • @elpe21
      @elpe21 4 місяці тому

      Can you tell more ? Thinking about switching from OpenAI RestApi

  • @neociber24
    @neociber24 6 місяців тому

    This make me notice I have never streamed content to a client side app in C#.

  • @T___Brown
    @T___Brown 6 місяців тому

    I worked with SK like 4 months ago. I couldnt use because of so many bugs. Maybe better now but I have already gone to python.

  • @andreyz3133
    @andreyz3133 6 місяців тому +1

    WoW streams wen ser?

  • @sushilb7994
    @sushilb7994 6 місяців тому

    Very nice!

  • @macoson
    @macoson 6 місяців тому

    Recommend Autogen which is also available for .NET

  • @Biker322
    @Biker322 6 місяців тому

    We have a cloud platform , clients all scream we want AI. But none can tell me exactly what they want AI to do. Got. POC working with aws bedrock, but still, can’t think of a single use case for it.
    Our clients want to say they have something AI, seems to pretty much be it.

  • @vyteniskajackas7579
    @vyteniskajackas7579 6 місяців тому +3

    Oh I wish you would have said for AI generated title at the start "this title is terrible" but still use it on this video as a joke

  • @Radictor44
    @Radictor44 6 місяців тому +1

    Where's the kill switch 😂

  • @mihaimyh
    @mihaimyh 6 місяців тому

    WoW FTW!

  • @scf0carbonete
    @scf0carbonete 6 місяців тому +1

    It's great. Sugestion made a Maui, Onxx, PHI-3 small or Gemini nano , multiple OS's example.

  • @devincarlson8866
    @devincarlson8866 6 місяців тому

    Someone has been playing Cataclysm Classic recently and misses Wrath haven’t they…

  • @ronnyek4242
    @ronnyek4242 6 місяців тому

    Not that open implies free... But I find the trend of hosting AI models and charging fees for consumption problematic. Most of the examples I've seen really couldn't be incorporated into real world apps without losing money. I hate that Microsoft kind of pushes people to cloud vendor lockin. I see azure specific stuff and automatically rule it out as a solution

    • @mekowgli
      @mekowgli 6 місяців тому

      They require serious compute, so it's only fair to charge money for it. Although Azure pricing is, as usual, pretty wild. But the good thing is that, from what I understand, the API schemas are pretty much shared between different providers (including local ones) so you can use the same libraries to connect to different services.

  • @octaviandobre
    @octaviandobre 5 місяців тому

    Lol you cant just easily create this resource on Azure. You have to create a form to request access. And you need company details, you cant just do this as a normal person with personal email. !!!!!!!!!!!!!

  • @mostrealtutu
    @mostrealtutu 6 місяців тому +1

    No

  • @demarcorr
    @demarcorr 6 місяців тому

    i dont wanna and you cant make me.