Skip to content

refactor: move Role to utils/role.py - #298

Merged
luca-belli merged 1 commit into
release/2.1from
refactor/move-role
Oct 28, 2026
Merged

luca-belli merged 1 commit into
release/2.1from
refactor/move-role

Conversation

@luca-belli

Copy link
Copy Markdown
Collaborator

Roadmap step 0, second item (#296): move `Role` out of `llm_clients/llm_interface.py` into `utils/role.py`.

  • `Role` is unchanged; only its home moves.
  • Import lines only, across 32 files plus one test README.
  • `llm_clients` no longer re-exports `Role` (no alias left behind).
  • `utils/conversation_utils.py` no longer imports from `llm_clients`.

The rename to `USER`/`CHATBOT`/`JUDGE` is the next PR.

Checks

  • ruff clean; pyright error count unchanged (155 before and after, all pre-existing)
  • full-run check over the saved 200-conversation run: matches the baseline

🤖 Generated with Claude Code

Role now lives in utils, so utils/conversation_utils.py no longer imports
from llm_clients. Import lines only; llm_clients no longer re-exports Role.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@luca-belli
luca-belli requested a review from a team as a code owner October 27, 2026 23:08
Comment thread src/vera_mh/utils/role.py
class Role(Enum):
"""Role of the LLM in a conversation."""

PERSONA = "persona" # User roleplaying as a human seeking help

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

should this be user/chatbot or are we making the change later?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

change will be made leter

@luca-belli
luca-belli added this pull request to stack #300 October 27, 2026 23:18
@luca-belli
luca-belli merged commit 66d6c10 into release/2.1 Oct 28, 2026
3 checks passed
@luca-belli
luca-belli deleted the refactor/move-role branch October 28, 2026 00:26
luca-belli added a commit that referenced this pull request Oct 28, 2026
…onversation_role()

Addresses review on #299: no log-only label, build_langchain_messages takes a
plain Role again, and tests use Role. Adds the CHANGELOG entry for #298 and
#299.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant