mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-03-06 17:30:20 +00:00
- Add non-contiguous search/replace support using ... syntax - Add judge support for evaluating LLM outputs with ratings - Improve error handling and reporting in eval runner - Add full section replacement support without search blocks - Add fabricators and specs for artifact diffing - Track failed searches to improve debugging - Add JS syntax validation for artifact versions in eval system - Update prompt documentation with clear guidelines * improve eval output * move error handling * llm as a judge * fix spec * small note on evals
20 lines
527 B
Ruby
20 lines
527 B
Ruby
# frozen_string_literal: true
|
|
Fabricator(:ai_artifact) do
|
|
user
|
|
post
|
|
name { sequence(:name) { |i| "artifact_#{i}" } }
|
|
html { "<div>Test Content</div>" }
|
|
css { ".test { color: blue; }" }
|
|
js { "console.log('test');" }
|
|
metadata { { public: false } }
|
|
end
|
|
|
|
Fabricator(:ai_artifact_version) do
|
|
ai_artifact
|
|
version_number { sequence(:version_number) { |i| i } }
|
|
html { "<div>Version Content</div>" }
|
|
css { ".version { color: red; }" }
|
|
js { "console.log('version');" }
|
|
change_description { "Test change" }
|
|
end
|