I have a clientid and client secret for every api call that happens through tools.
I am initializing crews during start of the application and does not want to do that again for each new client id.
Example
class MainFlowState(BaseModel):
user_msg: str = ""
routes: list = []
results_from_routes: list = []
chat_history: list = []
complete_chat_history: list = []
flow_history: list = []
session_id: str = ""
client_id: str = ""
client_secret: str = ""
class MainFlow(Flow[MainFlowState]):
other_knowledge_base = glob.glob(f"{RAGConfig(file_type="pdf").other_knowledge_base}/*.pdf")
temp_knowledge_base = glob.glob(f"{RAGConfig(file_type="pdf").temp_knowledge_base}/*.pdf")
temp2_knowledge_base = glob.glob(f"{RAGConfig(file_type="pdf").temp2_knowledge_base}/*.pdf")
crews: dict = {
"ACrew": ACrew().crew(),
"BCrew": BCrew(available_data=temp_knowledge_base).crew(),
"CCrew": CCrew(available_data=temp2_knowledge_base).crew(),
"SSCrew": SSCrew().crew(),
"AICrew": AICrew(available_data=other_knowledge_base).crew(),
"SCrew": SCrew().crew(),
}
@start()
def start_manager(self):
print("Started Flow")
result = (
self.crews["ACrew"]
.kickoff(inputs={
"user_msg": self.state.user_msg,
"complete_chat_history": "\n".join([f"{_['role']}: {_['content']}" for _ in self.state.chat_history[:-1]]),
}))
In this ACrew has tools that needs client_id and client_secret. How do i pass it without giving it to agent?