Skip to content

Conversation

@dangazineu
Copy link
Collaborator

Fixes #28.

…ad serialization logic.

This change introduces a design document that details the approach for replacing string-based user messages with structured request objects. This will decouple message formatting from the calling code and move serialization logic into provider-specific implementations.
This change updates the llm.provider interface and associated functions to accept structured request payloads instead of pre-formatted strings.

This is the next step in refactoring the serialization logic out of calling packages and into the provider-specific implementations.

Placeholders are used in the provider implementations to ensure the code compiles, with the actual serialization logic to be added in a subsequent change.
This commit refactors the way user messages are constructed and passed to LLM providers.

Previously, the user message string was built in the  and  packages. This created a tight coupling between the calling code and the specific prompt format expected by the LLM.

With this change, the responsibility of serializing the request data into a user message is moved to the individual LLM provider implementations ( and ). This is achieved by introducing new request structs in the  package, which are then passed to the providers.

This refactoring improves the separation of concerns, making the code more modular and easier to maintain and extend.
@dangazineu dangazineu merged commit caa056f into vybdev:main Jun 28, 2025
1 check passed
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.

Remove the serialization logic from the payload package

1 participant