Skip to content

Commit

Permalink
1.0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
acharneski committed Nov 12, 2023
1 parent ca208f1 commit acc2e78
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ Maven:
<dependency>
<groupId>com.simiacryptus</groupId>
<artifactId>skyenet-webui</artifactId>
<version>1.0.25</version>
<version>1.0.26</version>
</dependency>
```

Gradle:

```groovy
implementation group: 'com.simiacryptus', name: 'skyenet', version: '1.0.25'
implementation group: 'com.simiacryptus', name: 'skyenet', version: '1.0.26'
```

```kotlin
implementation("com.simiacryptus:skyenet:1.0.25")
implementation("com.simiacryptus:skyenet:1.0.26")
```

### 🌟 To Use
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gradle Releases -> https://github.com/gradle/gradle/releases
libraryGroup = com.simiacryptus.skyenet
libraryVersion = 1.0.25
libraryVersion = 1.0.26
gradleVersion = 7.6.1

# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ abstract class ChatApplicationBase(
applicationName: String,
oauthConfig: String? = null,
temperature: Double = 0.1,
resourceBase: String = "simpleSession",
) : ApplicationBase(
applicationName = applicationName,
oauthConfig = oauthConfig,
temperature = temperature,
resourceBase = resourceBase,
) {

override fun newSession(sessionId: String): SessionInterface {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.simiacryptus.skyenet.sessions

import com.simiacryptus.openai.OpenAIClient
import com.simiacryptus.skyenet.util.MarkdownUtil

open class ChatSession(
val parent: ApplicationBase,
Expand Down Expand Up @@ -48,7 +49,7 @@ open class ChatSession(

open fun getResponse() = api.chat(newChatRequest, model).choices.first().message?.content.orEmpty()

open fun renderResponse(response: String) = """<pre>$response</pre>"""
open fun renderResponse(response: String) = """<div>${MarkdownUtil.renderMarkdown(response)}</div>"""

open fun onResponse(response: String, responseContents: String) {}

Expand Down

0 comments on commit acc2e78

Please sign in to comment.