Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
morisil committed Oct 15, 2024
1 parent 2f02b61 commit 61c4a31
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,30 @@ Add to your `build.gradle.kts`:
```kotlin
dependencies {
implementation("com.xemantic.anthropic:anthropic-sdk-kotlin:.0.3.1")
implementation("io.ktor:ktor-client-java:3.0.0") // or the latest ktor version
}
```

And in case of JVM:

```kotlin
dependencies {
implementation("io.ktor:ktor-client-java:3.0.0") // or the latest ktor version
}
```

If you are planning to use tools, you will also need:

```kotlin
plugins {
// ... other plugins like kotlin jvm or multiplatform
kotlin("plugin.serialization") version "2.0.21"
}

dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3")
}
```

The simplest code look like:

```kotlin
Expand Down Expand Up @@ -85,7 +105,7 @@ fun main() {
}
.filterIsInstance<ContentBlockDeltaEvent>()
.map { (it.delta as Delta.TextDelta).text }
.collect { delta -> println(delta) }
.collect { delta -> print(delta) }
}
}
```
Expand Down Expand Up @@ -206,6 +226,13 @@ More sophisticated code examples targeting various Kotlin platforms can be found
[anthropic-sdk-kotlin-demo](https://github.com/xemantic/anthropic-sdk-kotlin-demo)
project.

## Projects using anthropic-sdk-kotlin

* [anthropic-sdk-kotlin-demo](https://github.com/xemantic/anthropic-sdk-kotlin-demo): more complex examples
and use cases
* [claudine](https://github.com/xemantic/claudine): Claudine, the only AI assistant you will ever need, the actual
reason why `anthropic-sdk-kotlin` came to being, to allow me building Claudine and other AI agents.

## Building the project

```shell
Expand Down

0 comments on commit 61c4a31

Please sign in to comment.