fix(Anthropic Chat Model Node): Update credentials test endpoint (#11756)

This commit is contained in:
Eugene
2024-11-19 11:29:25 +01:00
committed by GitHub
parent 4880d1a92a
commit 6cf0abab5b

View File

@@ -35,15 +35,15 @@ export class AnthropicApi implements ICredentialType {
test: ICredentialTestRequest = { test: ICredentialTestRequest = {
request: { request: {
baseURL: 'https://api.anthropic.com', baseURL: 'https://api.anthropic.com',
url: '/v1/complete', url: '/v1/messages',
method: 'POST', method: 'POST',
headers: { headers: {
'anthropic-version': '2023-06-01', 'anthropic-version': '2023-06-01',
}, },
body: { body: {
model: 'claude-2', model: 'claude-3-haiku-20240307',
prompt: '\n\nHuman: Hello, world!\n\nAssistant:', messages: [{ role: 'user', content: 'Hey' }],
max_tokens_to_sample: 256, max_tokens: 1,
}, },
}, },
}; };