Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

fix: anthropic api

Christian Feia9142865d8b3
diff --git a/lib/llm/providers/anthropic.js b/lib/llm/providers/anthropic.js
index 944777b..058e335 100644
--- a/lib/llm/providers/anthropic.js
+++ b/lib/llm/providers/anthropic.js
@@ -44,7 +44,7 @@ export class Anthropic extends Generic {
getMessage (data) {
const messages = data?.content || []
- const message = messages[messages.length - 1].text || ''
+ const message = messages[messages.length - 1]?.text || ''
return message.replace('<|eot_id|>', '')
}
}