GithubHelp home page GithubHelp logo

alexcalabrese / semantic-kernel-ecom Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 5.25 MB

AI-Powered eShopOnWeb E-commerce using Semantic Kernel

License: MIT License

C# 73.48% HTML 19.87% CSS 3.33% Dockerfile 0.32% SCSS 3.00% JavaScript 0.01%
semantic-kernel ai azure dall-e dotnet openai

semantic-kernel-ecom's Introduction

AI-Powered eShopOnWeb E-commerce using Semantic Kernel

This is the demo used during "Semantic Kernel: Empower your app with Azure OpenAI" talk at Azure Day Rome (23/06/2023).

๐ŸŽฏ The objective of this demo is to show how simple is to include AI capabilities in your apps with just a few lines of code.

This is an empowered version of the eShopOnWeb Ecommerce Sample app using Microsoft Semantic Kernel.

The new capabilities consist in:

  1. Generate an enhanced prompt from the Name and Description fields of a new product using a Semantic Function.

  2. Use that prompt to create an image of the product using DALL-E.

For convenience, the new features are located in src/ApplicationCore/Entities/Utility.cs, you can check the code clicking here.

This is an example of a generated image using this demo:

Running the sample

โš ๏ธ In order to use AI capabilites you have to add a settings.json file with your credentials in src/ApplicationCore/config/.

The store's home page should look like this:

eShopOnWeb home page screenshot

Go to the PublicApi folder in a terminal window and run dotnet run from there.

After that from the Web folder you should run dotnet run --launch-profile Web.

Now you should be able to browse to https://localhost:5001/.

The admin part in Blazor is accessible to https://localhost:5001/admin

Running the sample in the dev container

This project includes a .devcontainer folder with a dev container configuration, which lets you use a container as a full-featured dev environment.

You can use the dev container to build and run the app without needing to install any of its tools locally! You can work in GitHub Codespaces or the VS Code Dev Containers extension.

Learn more about using the dev container in its readme.

Running the sample using Docker

You can run the Web sample by running these commands from the root folder (where the .sln file is located):

docker-compose build
docker-compose up

You should be able to make requests to localhost:5106 for the Web project, and localhost:5200 for the Public API project once these commands complete. If you have any problems, especially with login, try from a new guest or incognito browser instance.

You can also run the applications by using the instructions located in their Dockerfile file in the root of each project. Again, run these commands from the root of the solution (where the .sln file is located).

semantic-kernel-ecom's People

Contributors

alexcalabrese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.