Skip to content

Commit

Permalink
docs(readme): update README
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Nov 11, 2024
1 parent f5f9af5 commit 474508c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- ⚡ Real-time streaming responses via Kotlin Flows
- 🧩 Rich, idiomatic DSL for clean and expressive syntax
- 🔒 Ensures required validations are met before request submission
- 🔧 Allows specifying default values for API requests in client configuration
- ⏳ Automatically handles rate limiting and retries on failed requests
- 📱 Supports multiple platforms:
- Android
Expand Down Expand Up @@ -50,6 +51,22 @@ val apiKey = getenv("GROQ_API_KEY")!!.toKString() // Native
val client = Groq(apiKey)
```

### Specifying default values
You can configure default values for requests. These values will be automatically applied to every request made with a DSL function.
```kotlin
val client = Groq(apiKey) {
defaults {
chatCompletion {
model = GroqModel.LLAMA_3_8B_8192
}

audioTranscription {
format = AudioResponseFormat.VERBOSE_JSON
}
}
}
```

### Chat completion
```kotlin
val response = client.chat {
Expand Down

0 comments on commit 474508c

Please sign in to comment.