Skip to content

Conversation

@Azgaar
Copy link
Owner

@Azgaar Azgaar commented Jun 14, 2025

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

  • Bug fix
  • New feature
  • Refactoring / style
  • Documentation update / chore
  • Other (please describe)

Versioning

  • Version is updated
  • Changed files hash is updated

kroryan and others added 4 commits June 14, 2025 14:03
* 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
@Azgaar Azgaar self-assigned this Jun 14, 2025
Copilot AI review requested due to automatic review settings June 14, 2025 13:51
@netlify
Copy link

netlify bot commented Jun 14, 2025

Deploy Preview for afmg ready!

Name Link
🔨 Latest commit c891689
🔍 Latest deploy log https://app.netlify.com/projects/afmg/deploys/684d7e5dbc90930008f59f3a
😎 Deploy Preview https://deploy-preview-1211--afmg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 generateWithOllama provider and map it in PROVIDERS and MODELS.
  • Enhance handleStream to uniformly parse streamed lines and improve error messaging.
  • Update index.html with 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 generateWithOllama implementation 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}) {

@Azgaar Azgaar merged commit d9391d6 into master Jun 14, 2025
4 checks passed
@Azgaar Azgaar deleted the ollama branch June 14, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants