Chain to generates tasks.
| 62 | return cls(prompt=prompt, llm=llm, verbose=verbose) |
| 63 | |
| 64 | class 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 | |
| 79 | class TaskPrioritizationChain(LLMChain): |
| 80 | """Chain to prioritize tasks.""" |
nothing calls this directly
no outgoing calls
no test coverage detected