Giter Site home page Giter Site logo

scottleef / spring-ai-azure-workshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/spring-ai-azure-workshop

0.0 0.0 0.0 129 KB

Workshop material for Spring AI and Azure OpenAI Service

License: MIT License

Shell 0.97% Java 87.92% Smalltalk 4.97% Dockerfile 6.14%

spring-ai-azure-workshop's Introduction

Spring AI Workshop

Prerequisites

Before you beginm make sure to set the following environment variables.

export SPRING_AI_AZURE_OPENAI_API_KEY=<INSERT KEY HERE>
export SPRING_AI_AZURE_OPENAI_ENDPOINT=<INSERT ENDPOINT URL HERE>

Azure AI Deployments

The configuration assumes you have already created deployments of the following names in the Azure OpenAI Studio

  • Deployment Name: gpt-35-turbo-16k with the model name gpt-35-turbo-16k
  • Deployment Name: text-embedding-ada-002 with the model name text-embedding-ada-002

NOTE: Spring configuration properties currently use the property-name model instead of deployment-name so don't get confused. Spring AI will be renaming the property in the future to avoid confusion. See here for more information.

For the chat, the configuration in application.properties should contain the following

spring.ai.azure.openai.chat.options.model=gpt-35-turbo-16k

The default value for the embedding model is text-embedding-ada-002, but if you wanted to change it you would set the configuration in application.properties as shown below.

spring.ai.azure.openai.embedding.options.model=text-embedding-ada-002

Workshop Overview

The workshop consists of six examples, each with a dedicated README file.

All six workshop examples are organized into individual Java packages within this project. In each package, you'll find a Spring @RestController class that serves as the entry point for showcasing the discussed functionality.

To interact with the @RestController, you will be using the http utility as a user-friendly alternative to curl.

Detailed instructions and exercises for each example can be found in their respective README files:

  • 1-README-tell-me-a-joke.md
  • 2-README-prompt-templating.md
  • 3-README-prompt-roles.md
  • 4-README-output-parser.md
  • 5-README-stuff-prompt.md
  • 6-README-retrieval-augmented-generation.md

These guides will walk you through the workshop exercises.

spring-ai-azure-workshop's People

Contributors

microsoftopensource avatar markpollack avatar microsoft-github-operations[bot] 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.