mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-03 18:27:43 +00:00
feat: enhance timeout management and knowledge base handling in CoSTEER components (#1130)
* feat: enhance timeout management and knowledge base handling in CoSTEER components * fix a little bug * fix small bug * fix a small bug * Update rdagent/scenarios/data_science/loop.py Co-authored-by: you-n-g <you-n-g@users.noreply.github.com> * add scale check * fix a small bug * fix CI * use dynamic chat_token_limit & remove repeated lines * fix CI * remove useless comment * fix small bug * update draft appendix * fix prompt * add code correctness as top priority --------- Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
This commit is contained in:
@@ -77,8 +77,16 @@ class EvolvingStrategy(ABC):
|
||||
class RAGStrategy(ABC):
|
||||
"""Retrieval Augmentation Generation Strategy"""
|
||||
|
||||
def __init__(self, knowledgebase: EvolvingKnowledgeBase) -> None:
|
||||
self.knowledgebase: EvolvingKnowledgeBase = knowledgebase
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
self.knowledgebase: EvolvingKnowledgeBase = self.load_or_init_knowledge_base(*args, **kwargs)
|
||||
|
||||
@abstractmethod
|
||||
def load_or_init_knowledge_base(
|
||||
self,
|
||||
*args: Any,
|
||||
**kwargs: Any,
|
||||
) -> EvolvingKnowledgeBase:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def query(
|
||||
@@ -102,3 +110,14 @@ class RAGStrategy(ABC):
|
||||
|
||||
RAGStrategy should maintain the new knowledge all by itself.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def dump_knowledge_base(self, *args: Any, **kwargs: Any) -> None:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def load_dumped_knowledge_base(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""This is to load the dumped knowledge base.
|
||||
It's mainly used in parallel coding of which several coder shares the same knowledge base.
|
||||
Then the agent should load the knowledge base from others before updating it.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user