Josh-XT / AGiXT

AGiXT is a dynamic AI Agent Automation Platform that seamlessly orchestrates instruction management and complex task execution across diverse AI providers. Combining adaptive memory, smart features, and a versatile plugin system, AGiXT delivers efficient and comprehensive AI solutions.
https://AGiXT.com
MIT License
2.63k stars 351 forks source link

Add DPO endpoint #1198

Closed Josh-XT closed 4 months ago

Josh-XT commented 4 months ago

Added DPO Endpoint

Added a new DPO endpoint /api/agent/{agent_name}/dpo accepts a json body with user_input for the question and injected_memories for a count of how many memories you want to be injected. Default is 10 injected memories.

Endpoint response will be:

{
    "prompt": "The question from user_input as well as context that was injected will be returned here",
    "chosen": "The chosen 'correct' answer will be returned here.",
    "rejected": "An intentionally incorrect answer will be returned here.",
}

More about DPO: https://huggingface.co/docs/trl/main/en/dpo_trainer

Also added more activity logging and better error handling on websearch.