feat: add OpenAI annotator support#42
Merged
Merged
Conversation
Add OpenAI-compatible API support to the Annotate step, matching the existing OpenAI filter support. This allows users running local inference servers (llama.cpp, text-generation-webui, etc.) to use both filtering and annotation without a separate Ollama instance. The annotator uses regex-based JSON extraction from chat responses (consistent with the existing OpenAI filter) rather than relying on response_format JSON schemas, making it compatible with any OpenAI-compatible server.
tyzbit
requested changes
May 20, 2026
Owner
tyzbit
left a comment
There was a problem hiding this comment.
One minor question. Looks great to me though, thank you!
tyzbit
approved these changes
May 20, 2026
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.
What
Add
OpenAIannotator support to theAnnotatestep, matching the existingOpenAIfilter support.Closes #41
Why
Users running local inference servers (llama.cpp, text-generation-webui, etc.) can now use both filtering and annotation without needing a separate Ollama instance. This is especially useful for CPU-only deployments where Ollama's overhead is undesirable.
Changes
annotator_openai.go— OpenAI annotator implementation (166 lines)openai-goclient with configurable base URLmodel_feedback,processed_number,processed_text,question_answerconfig.go— addedOpenAI OpenAIAnnotatorfield toAnnotateStepstructannotators.go— registered OpenAI annotator in the annotators sliceExample config