Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions data/semantickernel-data-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,9 @@
<artifactId>ojdbc11</artifactId>
<version>23.7.0.25.01</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
</dependency>
</dependencies>
</project>
1 change: 1 addition & 0 deletions samples/semantickernel-demos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
<module>booking-agent-m365</module>
<module>semantickernel-spring-starter</module>
<module>sk-presidio-sample</module>
<module>sk-database-sample</module>
</modules>
</project>
10 changes: 10 additions & 0 deletions samples/semantickernel-demos/sk-database-sample/.mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a newer wrapper version IIRC

14 changes: 14 additions & 0 deletions samples/semantickernel-demos/sk-database-sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Database Sample

This sample demonstrates how to use Semantic Kernel with a database to perform various operations such as creating,
reading, updating, and deleting records. The sample uses MySQL as the database engine.

# Prerequisites

- Docker/Docker Compose

# Running the Sample

- Ensure you have compiled/installed the Semantic Kernel library.
- Copy env.example to .env and fill out the settings.
- Run `./buildAndRun.sh` to build and run the sample.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -eux

./mvnw package

docker compose build && docker compose up
27 changes: 27 additions & 0 deletions samples/semantickernel-demos/sk-database-sample/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '3.6'
services:
mysql:
hostname: mysql
image: mysql:8.4
command: --mysql-native-password=ON
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_USER=a-user
- MYSQL_PASSWORD=a-password
- MYSQL_DATABASE=testdb
sk-database-sample:
image: "sk-database-sample"
depends_on:
- mysql
build:
context: .
dockerfile: ./sk-database-sample-dockerfile
secrets:
- ai-config
secrets:
ai-config:
file: ./.env

7 changes: 7 additions & 0 deletions samples/semantickernel-demos/sk-database-sample/env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# If OpenAI
#CLIENT_KEY="<KEY>"

# If Azure OpenAI
#USE_AZURE_CLIENT=true
#CLIENT_ENDPOINT="<ENDPOINT>"
#AZURE_CLIENT_KEY="<KEY>"
Loading