feat: add anthropic logs
This commit is contained in:
@@ -5,9 +5,15 @@ export async function message(text: string) {
|
||||
apiKey: process.env.ANTHROPIC_API_KEY
|
||||
});
|
||||
|
||||
return anthropic.messages.create({
|
||||
console.log('Anthropic request with text: ', text);
|
||||
|
||||
const response = await anthropic.messages.create({
|
||||
model: 'claude-3-5-sonnet-20240620',
|
||||
max_tokens: 1024,
|
||||
messages: [{ role: 'user', content: text }]
|
||||
});
|
||||
|
||||
console.log('Anthropic response: ', response);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user