Skip to content

Commit

Permalink
improved logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Orlov committed Aug 20, 2024
1 parent 7e3b376 commit 10e11d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions kube/chat-summarizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
containers:
- name: ollama
image: ghcr.io/diverofdark/telegramsummarizer:master
imagePullPolicy: Always
volumeMounts:
- mountPath: /ollama/
name: shared
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@ private void downloadModel(OllamaProperties props) throws Exception {
String line;
while ((line = reader.readLine()) != null) {
// Process each line of the response as it arrives
HashMap hashMap = Json.fromJson(line, HashMap.class);
String status = (String) hashMap.get("status");
logger.info("Progress: {}", status);
try {
HashMap hashMap = Json.fromJson(line, HashMap.class);
String status = (String) hashMap.get("status");
logger.info("Progress: {}", status);
} catch (Exception e) {
logger.error("Error parsing response: {}", line);
}
}

} catch (StreamClosedException e) { }
Expand Down

0 comments on commit 10e11d1

Please sign in to comment.