Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 643 Bytes

File metadata and controls

24 lines (17 loc) · 643 Bytes

Spring AI Function Calling Sample Application

Run

export SPRING_AI_OPENAI_API_KEY="your-openai-api-key"
./mvnw spring-boot:run

Example

This example call a function that checks if the manager is available.

curl http://localhost:8080\?msg\="Is+my+manager+available?"
Your manager is currently busy.

If no need to call a function, the application will respond with a generic message.

curl http://localhost:8080\?msg\="Can+you+help+my+programming+task?"
Of course! I'd be happy to help with your programming task. Please provide me with more details about the task and let me know how I can assist you.