Skip to content

Commit

Permalink
1.0.48 (#53)
Browse files Browse the repository at this point in the history
* 1.0.48

* 1.0.48

* [1.0.48] AWS portability

* wip

* webdev

* 1.0.48

* Update SimpleDiffUtil.kt
  • Loading branch information
acharneski authored Mar 1, 2024
1 parent 0c05842 commit 7fa9cb0
Show file tree
Hide file tree
Showing 29 changed files with 1,429 additions and 914 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.47</version>
<version>1.0.48</version>
</dependency>
```

Gradle:

```groovy
implementation group: 'com.simiacryptus', name: 'skyenet', version: '1.0.47'
implementation group: 'com.simiacryptus', name: 'skyenet', version: '1.0.48'
```

```kotlin
implementation("com.simiacryptus:skyenet:1.0.47")
implementation("com.simiacryptus:skyenet:1.0.48")
```

### 🌟 To Use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@ open class ActorSystem<T : Enum<*>>(
fun getActor(actor: T): BaseActor<*, *> {
return synchronized(actorMap) {
actorMap.computeIfAbsent(actor) {
val wrapper = getWrapper(actor.name)
when (val baseActor = actors[actor]) {
null -> throw RuntimeException("No actor for $actor")
is SimpleActor -> SimpleActorInterceptor(baseActor, wrapper)
is ParsedActor<*> -> ParsedActorInterceptor(baseActor, wrapper)
is CodingActor -> CodingActorInterceptor(baseActor, wrapper)
is ImageActor -> ImageActorInterceptor(baseActor, wrapper)
is TextToSpeechActor -> TextToSpeechActorInterceptor(baseActor, wrapper)
else -> throw RuntimeException("Unknown actor type: ${baseActor.javaClass}")
try {
val wrapper = getWrapper(actor.name)
when (val baseActor = actors[actor]) {
null -> throw RuntimeException("No actor for $actor")
is SimpleActor -> SimpleActorInterceptor(baseActor, wrapper)
is ParsedActor<*> -> ParsedActorInterceptor(baseActor, wrapper)
is CodingActor -> CodingActorInterceptor(baseActor, wrapper)
is ImageActor -> ImageActorInterceptor(baseActor, wrapper)
is TextToSpeechActor -> TextToSpeechActorInterceptor(baseActor, wrapper)
else -> throw RuntimeException("Unknown actor type: ${baseActor.javaClass}")
}
} catch (e: Throwable) {
log.warn("Error creating actor $actor", e)
actors[actor]!!
}
}
}
Expand All @@ -43,4 +48,8 @@ open class ActorSystem<T : Enum<*>>(
FunctionWrapper(JsonFunctionRecorder(File(sessionDir, ".sys/actors/$name")))
}
}

companion object {
private val log = org.slf4j.LoggerFactory.getLogger(ActorSystem::class.java)
}
}
Loading

0 comments on commit 7fa9cb0

Please sign in to comment.