n8n/packages/@n8n/nodes-langchain/credentials/OllamaApi.credentials.ts
कारतोफ्फेलस्क्रिप्ट™ 63b738a542
fix(Ollama Model Node): Use a simpler credentials test (#8318)
2024-01-12 16:37:46 +01:00

28 lines
531 B
TypeScript

import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
export class OllamaApi implements ICredentialType {
name = 'ollamaApi';
displayName = 'Ollama';
documentationUrl = 'ollama';
properties: INodeProperties[] = [
{
displayName: 'Base URL',
name: 'baseUrl',
required: true,
type: 'string',
default: 'http://localhost:11434',
},
];
test: ICredentialTestRequest = {
request: {
baseURL: '={{ $credentials.baseUrl }}',
url: '/',
method: 'GET',
},
};
}