|
1 |
| -# Kotlin AI Examples |
| 1 | +# <img src="https://raw.githubusercontent.com/devcrocod/Kotlin-AI-Examples/img/kotlin_icon.svg" width="30"/> Kotlin <img src="https://raw.githubusercontent.com/devcrocod/Kotlin-AI-Examples/img/kotlin_icon.svg" width="30"/> AI Examples |
2 | 2 |
|
3 |
| -This repository contains examples of using various AI frameworks with Kotlin. |
| 3 | +**Kotlin AI Examples** is a repository showcasing various AI frameworks integrated into Kotlin-based projects. |
| 4 | +Here you’ll find ready-to-use examples for Spring AI, LangChain4j, as well as interactive Kotlin notebooks. |
4 | 5 |
|
5 |
| -## Repository Structure |
| 6 | +--- |
6 | 7 |
|
7 |
| -The repository is organized into two main sections: |
| 8 | +## Contents |
8 | 9 |
|
9 |
| -### Kotlin Projects ([`/projects`](projects)) |
| 10 | +<table> |
| 11 | + <tr> |
| 12 | + <td><img src="img/kotlin_icon.svg" width="15" alt=""/> <a href="#kotlin-projects-projects">Kotlin Projects</a></td> |
| 13 | + <td><img src="img/ktn_plugin_icon.svg" width="15" alt=""/> <a href="#kotlin-notebooks-notebooks">Kotlin Notebooks</a></td> |
| 14 | + <td><a href="#getting-started">🚀 Getting Started</a></td> |
| 15 | + <td><a href="#prerequisites">⚙ Prerequisites</a></td> |
| 16 | + </tr> |
| 17 | +</table> |
10 | 18 |
|
11 |
| -Contains complete Kotlin projects demonstrating AI integration: |
| 19 | +--- |
12 | 20 |
|
13 |
| -#### Spring AI Examples ([`/projects/spring-ai`](projects/spring-ai)) |
| 21 | +## Kotlin Projects ([`/projects`](projects)) |
14 | 22 |
|
15 |
| -- [**helloworld**](projects/spring-ai/helloworld): Basic example of using Spring AI |
16 |
| -- [**spring-ai-examples**](projects/spring-ai/spring-ai-examples): Comprehensive collection of Spring AI feature |
| 23 | +This section contains complete Kotlin projects demonstrating AI integrations. |
| 24 | + |
| 25 | +### Spring AI Examples ([`/projects/spring-ai`](projects/spring-ai)) |
| 26 | + |
| 27 | +- **[helloworld](projects/spring-ai/helloworld)**: Basic example of using Spring AI |
| 28 | +- **[spring-ai-examples](projects/spring-ai/spring-ai-examples)**: A comprehensive set of Spring AI feature |
17 | 29 | demonstrations and examples
|
18 |
| -- [**playground-flight-booking**](projects/spring-ai/playground-flight-booking): AI-powered Expert System Demo using |
19 |
| - various AI providers (OpenAI, VertexAI Gemini, Azure OpenAI, Groq, and Anthropic Claude) |
| 30 | +- **[playground-flight-booking](projects/spring-ai/playground-flight-booking)**: An AI-powered flight booking system |
| 31 | + demo using multiple providers (OpenAI, VertexAI Gemini, Azure OpenAI, Groq, Anthropic Claude) |
20 | 32 |
|
21 |
| -#### LangChain4j Examples ([`/projects/langchain4j`](projects/langchain4j)) |
| 33 | +### LangChain4j Examples ([`/projects/langchain4j`](projects/langchain4j)) |
22 | 34 |
|
23 |
| -- [**langchain4j-spring-boot**](projects/langchain4j/langchain4j-spring-boot): Examples of using LangChain4j with Kotlin |
| 35 | +- **[langchain4j-spring-boot](projects/langchain4j/langchain4j-spring-boot)**: Examples of using LangChain4j with Kotlin |
24 | 36 | and Spring
|
25 | 37 |
|
26 |
| -### Kotlin Notebooks ([`/notebooks`](notebooks)) |
| 38 | +--- |
27 | 39 |
|
28 |
| -Contains Kotlin Jupyter notebooks with interactive examples and tutorials, organized by project: |
| 40 | +## Kotlin Notebooks ([`/notebooks`](notebooks)) |
29 | 41 |
|
30 |
| -#### Spring AI Kotlin Notebooks ([`/notebooks/spring-ai`](notebooks/spring-ai)) |
| 42 | +A collection of interactive Jupyter notebooks in Kotlin, organized by project. |
31 | 43 |
|
32 |
| -Interactive notebooks demonstrating Spring AI capabilities: |
| 44 | +### Spring AI Kotlin Notebooks ([`/notebooks/spring-ai`](notebooks/spring-ai)) |
33 | 45 |
|
34 | 46 | - Coming soon...
|
35 | 47 |
|
36 |
| -#### LangChain4j Kotlin Notebooks ([`/notebooks/langchain4j`](notebooks/langchain4j)) |
37 |
| - |
38 |
| -Interactive notebooks for LangChain4j examples: |
| 48 | +### LangChain4j Kotlin Notebooks ([`/notebooks/langchain4j`](notebooks/langchain4j)) |
39 | 49 |
|
40 | 50 | - Coming soon...
|
41 | 51 |
|
42 |
| -#### Agents ReaCtor (ARC) Kotlin Notebooks ([`/notebooks/arc`](notebooks/arc)) |
| 52 | +### Agents ReaCtor (ARC) Kotlin Notebooks ([`/notebooks/arc`](notebooks/arc)) |
43 | 53 |
|
44 |
| -Interactive notebooks demonstrating ARC capabilities: |
| 54 | +- **[WeatherAgent.ipynb](notebooks/arc/WeatherAgent.ipynb)**: Demonstrates creating an agent that retrieves real-time |
| 55 | + weather data for a specified location via WeatherAPI |
| 56 | +- **[SummarizerAgent.ipynb](notebooks/arc/SummarizerAgent.ipynb)**: Demonstrates creating an agent that summarizes web |
| 57 | + pages (e.g., blog posts) by processing HTML and generating concise summaries |
45 | 58 |
|
46 |
| -- [**WeatherAgent**](notebooks/arc/WeatherAgent.ipynb): Example of creating an agent that retrieves real-time weather |
47 |
| - data for a given location using WeatherAPI |
48 |
| -- [**SummarizerAgent**](notebooks/arc/SummarizerAgent.ipynb): Example of creating an agent that summarizes web pages |
49 |
| - content (like blog posts) by processing HTML and generating concise summaries |
| 59 | +--- |
50 | 60 |
|
51 | 61 | ## Getting Started
|
52 | 62 |
|
53 |
| -Each project in the respective directories contains its own README with specific instructions on how to run and use the |
54 |
| -examples. |
| 63 | +Each project in the [`projects`](projects) directory has its own README with detailed instructions on how to run and use |
| 64 | +the examples. |
| 65 | + |
| 66 | +--- |
55 | 67 |
|
56 | 68 | ## Prerequisites
|
57 | 69 |
|
58 | 70 | - Java 17+
|
59 | 71 | - Kotlin
|
60 |
| -- Specific API keys depending on the AI provider you want to use (check individual project READMEs for details) |
| 72 | +- Appropriate AI provider API keys (see each project’s README for more details) |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +> **Note** |
| 77 | +> Make sure you have the necessary access credentials for your chosen AI service (OpenAI, Azure, VertexAI, etc.) and the |
| 78 | +> required dependencies in your build scripts (Gradle/Maven). |
| 79 | +
|
| 80 | +<p align="center"> |
| 81 | + ⭐ If you enjoy this repository, please give it a star! |
| 82 | +</p> |
0 commit comments