MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / InitialTaskCreationChain

Class InitialTaskCreationChain

bmtools/agent/BabyagiTools.py:64–77  ·  view source on GitHub ↗

Chain to generates tasks.

Source from the content-addressed store, hash-verified

62 return cls(prompt=prompt, llm=llm, verbose=verbose)
63
64class InitialTaskCreationChain(LLMChain):
65 """Chain to generates tasks."""
66
67 @classmethod
68 def from_llm(cls, llm: BaseLLM, verbose: bool = True) -> LLMChain:
69 """Get the response parser."""
70 task_creation_template = (
71 "You are a planner who is an expert at coming up with a todo list for a given objective. For a simple objective, do not generate a complex todo list. Generate the first (only one) task needed to do for this objective: {objective}"
72 )
73 prompt = PromptTemplate(
74 template=task_creation_template,
75 input_variables=["objective"],
76 )
77 return cls(prompt=prompt, llm=llm, verbose=verbose)
78
79class TaskPrioritizationChain(LLMChain):
80 """Chain to prioritize tasks."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected