From 799fdf6c6648a3c54537a591f4a994196396abe0 Mon Sep 17 00:00:00 2001 From: Niels Simonides <5821618+nsmnds@users.noreply.github.com> Date: Wed, 1 May 2024 13:38:19 +0200 Subject: [PATCH] Added some minimal information to the readme to get started (#3) --- README.md | 29 +++++++++++++++++++++++- gradle/wrapper/gradle-wrapper.properties | 1 + src/core/build.gradle.kts | 2 +- src/example/build.gradle.kts | 5 ++-- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ede8472..76f1712 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,31 @@ # AIGENTIC -Framework to configure AI agents \ No newline at end of file +Framework to configure and run AI agents + + +## How to use + +To build an agent which uses OpenAI as model provider with local (non http tools) use the following dependencies: + +``` +implementation("community.flock.aigentic:core:0.0.4-SNAPSHOT") +implementation("community.flock.aigentic:openai:0.0.4-SNAPSHOT") +// CIO is for JVM, Android, Native. For other platforms pick the correct engine: https://ktor.io/docs/client-engines.html#platforms +implementation(libs.ktor.client.cio) +``` + +## Example agent + +[AdministrativeAgentExample](src/example/src/commonMain/kotlin/community/flock/aigentic/example/AdministrativeAgentExample.kt) + +### How to use snapshots + +In order to use SNAPSHOT versions of Aigentic please make sure both maven central and the Sonatype snapshot repository are configured: + +``` +repositories { + mavenCentral() + maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") } +} +``` \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0c85a1f..0b58127 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -4,3 +4,4 @@ distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +org.gradle.unsafe.configuration-cache=false diff --git a/src/core/build.gradle.kts b/src/core/build.gradle.kts index 866ff60..6e5c97b 100644 --- a/src/core/build.gradle.kts +++ b/src/core/build.gradle.kts @@ -17,7 +17,7 @@ kotlin { val commonMain by getting { dependencies { api(libs.coroutines.core) - implementation(libs.serialization.json) + api(libs.serialization.json) } } val commonTest by getting { diff --git a/src/example/build.gradle.kts b/src/example/build.gradle.kts index 78acec5..5fb3afa 100644 --- a/src/example/build.gradle.kts +++ b/src/example/build.gradle.kts @@ -13,8 +13,6 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - api(libs.coroutines.core) - implementation(libs.serialization.json) // FIXME temporary needed for tool Handler arguments implementation(project(":src:core")) implementation(project(":src:providers:openai")) } @@ -22,7 +20,8 @@ kotlin { val jvmMain by getting { dependencies { - implementation(libs.ktor.client.okhttp) + // CIO is for JVM, Android, Native. For other platforms pick the correct engine: https://ktor.io/docs/client-engines.html#platforms + implementation(libs.ktor.client.cio) } } }