Giter Club home page Giter Club logo

spring-ai-azure-workshop's Introduction

spring-ai-workshop

Workshop material for Spring AI

The workshop uses the Spring CLI project.

It provides a command line application named spring

You will create the code for Exercise #1, the "Hello World" AI project, using the command spring boot new. See below.

The code for additional exercises will use the command spring boot add

To access the projects used in these exercises, we first need to add the ai-azure-catalog.

Let's get started.

Add exercises to the spring project catalog

spring project-catalog add azure-ai https://github.com/rd-1-2022/ai-azure-catalog

Exercise #1 - Create the first Hello World project

Create a new project using the following command. You can pick a different

  • name: The following example uses the name myai as the project name
  • package name: The following example uses the name com.xkcd.ai in honor of XKCD.
spring boot new myai ai-azure-hello-world --package-name com.xkcd.ai

You will now have a project with the structure shown below

cd myai
$ tree
.
├── mvnw
├── mvnw.cmd
├── pom.xml
├── README.md
└── src
    └── main
        ├── java
        │   └── com
        │       └── xkcd
        │           └── ai
        │               ├── Application.java
        │               └── helloworld
        │                   ├── Completion.java
        │                   └── SimpleAiController.java
        └── resources
            └── application.properties

Follow the instuctions in README.md to complete the exercise.

Exercise #2 - Prompt Templating

** MAKE SURE YOU ARE IN THE ROOT OF THE JAVA PROJECT **

Now add the code for Prompt Templating

spring boot add ai-azure-prompt-templating

Look at the README-ai-azure-prompt-templating.md file for instructions.

Your directory tree should look like:

$ tree
.
├── mvnw
├── mvnw.cmd
├── pom.xml
├── README-ai-azure-prompt-templating.md
├── README.md
└── src
    └── main
        ├── java
        │   └── com
        │       └── xkcd
        │           └── ai
        │               ├── Application.java
        │               ├── helloworld
        │               │   ├── Completion.java
        │               │   └── SimpleAiController.java
        │               └── prompttemplate
        │                   └── PromptTemplateController.java
        └── resources
            ├── application.properties
            └── prompts
                └── joke-prompt.st

Exercise #3 - Prompt Roles

Now add the code for the Prompt Roles exercise.

spring boot add ai-azure-prompt-roles

Look at the README-ai-azure-prompt-roles.md file for instructions.

Exercise #4 - Output Parser

Now add the code for Output Parser exercise.

spring boot add ai-azure-output-parser

Look at the README-ai-azure-output-parser.md file for instructions.

Exercise #5 - Chains

Now add the code for Chains exercise.

spring boot add ai-azure-chains

Look at the README-ai-azure-chains.md file for instructions.

Exercise #6 - Stuff the Prompt

Now add the code for the Stuff the Prompt exercise.

spring boot add ai-azure-stuff-prompt

Look at the README-ai-azure-chains.md file for instructions.

Exercise #7 - Retrieval Augmented Generation

Now add the code for the Retrieval Augmented Generation exercise.

spring boot add ai-azure-rag

Look at the README-ai-azure-retrieval-augmented-generation.md file for instructions.

spring-ai-azure-workshop's People

Contributors

markpollack avatar asaikali 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.