Changesets · Branches · Tags · Compare
| Changeset | 4d2cde11634f9b89ebfebc4569a299238892b7246abe0b14287da74ec76133d8 |
|---|---|
| Author | Aditya Mitra <61635505+uinstinct@users.noreply.github.com> · 2025-09-18 05:00 +05:30 |
| Committer | GitHub <noreply@github.com> · 2025-09-17 16:30 -07:00 |
| Parents | 0bee98b44db8 |
2 files changed
modified core/llm/llms/Ollama.ts +5 −0
| @@ -269,6 +269,11 @@ | ||
| 269 | 269 | return this.modelMap[this.model] ?? this.model; |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | + get contextLength() { | |
| 273 | + const DEFAULT_OLLAMA_CONTEXT_LENGTH = 8192; // twice of https://github.com/ollama/ollama/blob/29ddfc2cab7f5a83a96c3133094f67b22e4f27d1/envconfig/config.go#L185 | |
| 274 | + return this._contextLength ?? DEFAULT_OLLAMA_CONTEXT_LENGTH; | |
| 275 | + } | |
| 276 | + | |
| 272 | 277 | private _getModelFileParams( |
| 273 | 278 | options: CompletionOptions, |
| 274 | 279 | ): OllamaModelFileParams { |
modified packages/llm-info/src/providers/os.ts +1 −0
| @@ -4,5 +4,6 @@ | ||
| 4 | 4 | { |
| 5 | 5 | model: "starcoder2:3b", |
| 6 | 6 | displayName: "StarCoder 2 3B", |
| 7 | + contextLength: 8192, | |
| 7 | 8 | }, |
| 8 | 9 | ]; |