Skip to content

Enhance Adapter for Tool-Use Prompts #11

@aafre

Description

@aafre

The LlamaCppAdapter needs to be taught how to correctly format the system prompt to make the LLM aware of the available tools. Different models have different preferred formats for this, so we need a robust way to inject the tool definitions into the context.

Acceptance Criteria:

  • The LlamaCppAdapter has a new internal method that takes a list of Tool objects.
  • This method correctly formats the tools into a string (e.g., using XML tags or a JSON structure) that is prepended to the user's prompt or included in the system message.
  • The main generate_structured and generate_freeform methods are updated to use this new formatter when tools are provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions