Giter VIP home page Giter VIP logo

ai-samples's Introduction

page_type languages products urlFragment name description
sample
azdeveloper
bicep
csharp
powershell
azure
ai-services
azure-openai
ai-samples
AI Samples for .NET
.NET samples demonstrating how to use AI in your .NET applications.

AI Samples for .NET

Welcome to the official home for .NET samples demonstrating how to use AI in your .NET applications. If you're new to AI, start at the top and work your way down. Otherwise, jump in wherever suits your interests.

Build 2024 - Infusing your .NET Apps with AI: Practical Tools and Techniques

Discover how to bring AI into your .NET application! This session covers the tools, libraries, and best practices for incorporating LLMs or other AI capabilities to create an "intelligent app". We'll explore practical examples, including how to leverage Azure AI services and the .NET AI ecosystem, to enhance your apps with AI.

Infusing your .NET Apps with AI: Practical Tools and Techniques Youtube Preview

Youtube: Infusing your .NET Apps with AI: Practical Tools and Techniques

Quickstarts using OpenAI

# Topic GitHub Link
1 Text Summary Hike Benefits Summary Project
2 Hiker AI Hiker AI Project
3 Chat Context/Data Chatting About my Previous Hikes Project
4 Hiker AI Pro (Tool extension) Hiker AI Pro
5 Generating images Hike Images Project
REF Using Milvus Coming Soon
REF Using Qdrant Coming Soon

Quickstarts using the Azure OpenAI SDK

# Topic GitHub Link
1 Text Summary Hike Benefits Summary Project
2 Hiker AI Hiker AI Project
3 Chat Context/Data Chatting About my Previous Hikes Project
4 Hiker AI Pro (Tool extension) Hiker AI Pro
5 Generating images Hike Images Project

LLM Core Concepts

# Topic GitHub Link
REF Tokenizer Coming Soon
REF Embeddings Coming Soon
REF RAG Coming Soon
REF Prompts / Prompt Engineering Coming Soon

End to End Examples

# Topic GitHub Link
E2E Azure Search . Azure Search Repository
E2E E-Shop Sample E-Shop Repository

Local Models

# Topic GitHub Link
REF Phi Phi
REF Llama 2 Coming Soon

Local Embedding Models

# Topic GitHub Link
REF Clip Coming Soon

Tokenizers

# Topic GitHub Link
REF TikToken Coming Soon

Vector Databases

# Topic GitHub Link
REF Azure AI Search Coming Soon
REF PostgreSQL + pgvector Coming Soon
REF Milvus Coming Soon
REF Qdrant Coming Soon

Reference Examples

# Topic GitHub Link
REF Vector<T> Coming Soon

.NET Foundation

There are many .NET related projects on GitHub.

  • .NET home repo - links to 100s of .NET projects, from Microsoft and the community.
  • ASP.NET Core home - the best place to start learning about ASP.NET Core.

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

License

.NET (including the csharp-notebooks repo) is licensed under the MIT license.

ai-samples's People

Contributors

fboucher avatar jakeradmsft avatar jianingwang123 avatar jmatthiesen avatar laurentkempe avatar littlelittlecloud avatar mairaw avatar microsoft-github-operations[bot] avatar microsoftopensource avatar stephentoub 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

ai-samples's Issues

Error on Phi - Unhandled exception. System.ArgumentOutOfRangeException: Length of JSON exceeded int.MaxValue, not supported yet (Parameter 'length')

Hi, I have this error while running the local-models/Phi, may I know how to resolve it?

My system is Ubuntu 22.04 and runs as CPU. I have tried to change to the latest version of TorchSharp 0.102.4, the error was the same.

Loading Phi2 from huggingface model weight folder
Unhandled exception. System.ArgumentOutOfRangeException: Length of JSON exceeded int.MaxValue, not supported yet (Parameter 'length')
at TorchSharp.PyBridge.Safetensors.LoadIndex(Stream stream)
at TorchSharp.PyBridge.PyBridgeModuleExtensions.load_safetensors(Module module, Stream stream, Boolean strict, IList1 skip, Dictionary2 loadedParameters, Boolean leaveOpen)
at TorchSharp.PyBridge.PyBridgeModuleExtensions.load_safetensors(Module module, String location, Boolean strict, IList1 skip, Dictionary2 loadedParameters)
at TorchSharp.PyBridge.PyBridgeModuleExtensions.load_checkpoint(Module module, String path, String checkpointName, Boolean strict, IList1 skip, Dictionary2 loadedParameters)
at PhiForCasualLM.FromPretrained(String modelFolder, String configName, String checkPointName, ScalarType defaultDType, String device) in /home/xxxx/ai-samples/src/local-models/Phi/Phi.cs:line 45
at Program.

$(String[] args) in /home/xxxx/ai-samples/src/local-models/Phi/Program.cs:line 32

Thank you.

LLaMA2 & LLaMA3 sample

Hi team,

LLamaSharp has already supported LLaMA2 and LLaMA3. Would you like to accept a PR which adds examples of LLaMA2 & LLaMA3 with it?

semantic kernel execise - feedback

Sample 1

Spell error in initilization
image

Sample 2

  • spell error: compilation -> completion
    image

  • spell error: whilw -> while
    image

  • resonse -> response
    image

Sample 3

  • The LLM invokes the funciton call before I even start asking my age when I use gpt-3.5-turbo
    image

Sample 4

  • initizing -> initializing and kerenel -> kernel
    image

Sample 5

  • Directoty -> Directory
    image

  • Whitespace missing and --prerelease tag is missing
    image

  • The highlighted using statement has already been added in previous steps
    image

  • Need to disable SKEXP warning between step 4 and 5
    image

Sample 6

  • Maksure -> make sure
    image

  • missing suppress skexp warning in source
    image

  • missing Kernel after Semantic
    image

Sample 7

  • The Complete sample project section is still for Sample 6
    image

  • Sevice -> Service
    image

  • kerel -> kernel
    image

  • Miss semi-colomn at the end of code snippet
    image

  • Not clear on how to invoke web api from console. Do we miss the setup for openapi page?
    image

Open Discussion?

Great Idea!

Open GitHub discussion to Speed Up Iteration.

Privide links to Direct Users to Discords.

Error: 'pwsh' is not recognized...

During the azd up command you may encounter and error with like this:

'pwsh' is not recognized as an internal or external command

It's because no recent (v7+) PowerShell version has been installed on the Windows computer.

To fix the issue you need to execute the command dotnet tool update --global PowerShell

Let's update the documentation to prevent this error.

Create a simple Chat web application sample

The sample(s) should focus on only basic chat with a web UI, which can serve as a starting point template for future samples or new exploratory projects.

With this, we should provide a few different options for front-end UIs:

  • .NET back-end + JavaScript front-end
  • .NET back-end + Blazor front-end
  • .NET back-end + .NET MAUI front-end

Provide a model/prompt evaluation building block for .NET devs

Today, the Python Evaluation building block can be used against a .NET backend that uses the Chat Protocol (Azure Search supports this). However, we know from customer feedback (A top request from MVPs) that they want a .NET native solution for this. The goal is to deliver .NET-specific building block documentation and sample code to support this. Currently this is still in a design phase, but the latest thinking is that we may adapt a community DotNet LLM Eval sample that was built by a fellow Microsoft employee (Maho Pacheco).

Work to be done:
• Evaluate options for LLM evaluation and land on the best practice guidance we’d give to devs. Decide if we’ll lead with the Python implementation for Build.
• Continue investigating what is needed for a .NET native evaluation block
• If continuing with adapting the DotNet LLM Eval sample, we’d need to:
o Likely provide an analysis UI that isn’t Grafana, for now aiming for parity with Pamela’s output.
o Figure out a solution for generating questions and answers to use as “grounded truth” – currently the Azure AI synthetics library, used by the Python block, does not have a .NET equivalent.
o Update to Support Semantic Kernel 1.x.
• Create guidance documentation

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.