Refactor error handling, client, and tests for Ollama integration
This commit is contained in:
@@ -95,7 +95,6 @@ describe('Validation Functions', () => {
|
||||
const errors = validatePluginSettings({
|
||||
ollamaUrl: 'http://localhost:11434',
|
||||
model: 'llama3',
|
||||
lastIndexTime: 0,
|
||||
});
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
@@ -104,7 +103,6 @@ describe('Validation Functions', () => {
|
||||
const errors = validatePluginSettings({
|
||||
ollamaUrl: 'invalid-url',
|
||||
model: 'llama3',
|
||||
lastIndexTime: 0,
|
||||
});
|
||||
expect(errors.length).toBe(1);
|
||||
expect(errors[0]).toContain('Ollama URL');
|
||||
@@ -114,7 +112,6 @@ describe('Validation Functions', () => {
|
||||
const errors = validatePluginSettings({
|
||||
ollamaUrl: 'http://localhost:11434',
|
||||
model: 'invalid@model',
|
||||
lastIndexTime: 0,
|
||||
});
|
||||
expect(errors.length).toBe(1);
|
||||
expect(errors[0]).toContain('Model');
|
||||
@@ -124,7 +121,6 @@ describe('Validation Functions', () => {
|
||||
const errors = validatePluginSettings({
|
||||
ollamaUrl: 'invalid-url',
|
||||
model: 'invalid@model',
|
||||
lastIndexTime: 0,
|
||||
});
|
||||
expect(errors.length).toBe(2);
|
||||
expect(errors[0]).toContain('Ollama URL');
|
||||
|
||||
Reference in New Issue
Block a user