Conversation
* ollama implementation * ollama implementation * Update ai-generator.js * Update README.md * Create OLLAMAREADME.MD * Update OLLAMAREADME.MD * Update notes-editor.js * Update index.html * Update OLLAMAREADME.MD * Update ai-generator.js
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
7 tasks
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for local Ollama-based AI text generation, updates the AI models list, refines error/stream handling, and bumps the version and UI tooltips.
- Introduce a new
generateWithOllamaprovider and map it inPROVIDERSandMODELS. - Enhance
handleStreamto uniformly parse streamed lines and improve error messaging. - Update
index.htmlwith tooltip improvements and bump script & version numbers.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| versioning.js | Bumped VERSION from 1.108.7 to 1.108.8. |
| modules/ui/ai-generator.js | Added generateWithOllama, updated PROVIDERS/MODELS, refined stream parsing and error handling. |
| index.html | Added data-tip attributes for key input/help, and bumped ai-generator.js script version. |
Comments suppressed due to low confidence (2)
modules/ui/ai-generator.js:88
- [nitpick] The 'key' parameter is used to represent the Ollama model name, which may be confusing. Consider renaming it to 'modelName' for clarity in both the function signature and UI.
async function generateWithOllama({key, model, prompt, temperature, onContent}) {
modules/ui/ai-generator.js:88
- The new
generateWithOllamaimplementation and updated streaming logic lack dedicated tests. Please add unit or integration tests covering successful streams, parsing failures, and error responses.
async function generateWithOllama({key, model, prompt, temperature, onContent}) {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Based on #1208 by @kroryan. Cleaned up the code and updated the instructions to be more user-friendly, available on wiki: https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Ollama-text-generation.
Tested and it works.
Type of change
Versioning