Skip to content

Commit

Permalink
chore: add log
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Aug 18, 2023
1 parent 4d5e573 commit dc5d14c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class CustomLLMProvider(val project: Project) : LLMProvider {
}, BackpressureStrategy.BUFFER)

try {
logger.warn("Starting to stream:")
return callbackFlow {
withContext(Dispatchers.IO) {
sseFlowable
Expand All @@ -94,6 +95,7 @@ class CustomLLMProvider(val project: Project) : LLMProvider {
if (engineFormat.isNotEmpty()) {
val chunk: String = JsonPath.parse(sse!!.data)?.read(engineFormat)
?: throw Exception("Failed to parse chunk")
logger.warn(" $chunk")
trySend(chunk)
} else {
val result: ChatCompletionResult =
Expand Down

0 comments on commit dc5d14c

Please sign in to comment.