feat: add OllamaLocalExecutor and update provider handling
- Introduced OllamaLocalExecutor to handle requests for the "ollama-local" provider. - Removed the direct URL construction for "ollama-local" from BaseExecutor. - Updated index.js to include the new OllamaLocalExecutor in the executors mapping. - Enhanced the ProvidersPage component to support dynamic addition of OpenAI/Anthropic compatible providers.
This commit is contained in:
14
open-sse/executors/ollama-local.js
Normal file
14
open-sse/executors/ollama-local.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { DefaultExecutor } from "./default.js";
|
||||
import { resolveOllamaLocalHost } from "../config/providers.js";
|
||||
|
||||
export class OllamaLocalExecutor extends DefaultExecutor {
|
||||
constructor() {
|
||||
super("ollama-local");
|
||||
}
|
||||
|
||||
buildUrl(model, stream, urlIndex = 0, credentials = null) {
|
||||
return `${resolveOllamaLocalHost(credentials)}/api/chat`;
|
||||
}
|
||||
}
|
||||
|
||||
export default OllamaLocalExecutor;
|
||||
Reference in New Issue
Block a user