MCPcopy
hub / github.com/melih-unsal/DemoGPT / getChain

Method getChain

demogpt/chains/chains.py:34–41  ·  view source on GitHub ↗
(cls, system_template="", human_template="", **kwargs)

Source from the content-addressed store, hash-verified

32
33 @classmethod
34 def getChain(cls, system_template="", human_template="", **kwargs):
35 prompts = []
36 if system_template:
37 prompts.append(SystemMessagePromptTemplate.from_template(system_template))
38 if human_template:
39 prompts.append(HumanMessagePromptTemplate.from_template(human_template))
40 chat_prompt = ChatPromptTemplate.from_messages(prompts)
41 return LLMChain(llm=cls.llm, prompt=chat_prompt).run(**kwargs)
42
43 @classmethod
44 def systemInputs(cls, instruction):

Callers 12

systemInputsMethod · 0.45
planMethod · 0.45
planWithInputsMethod · 0.45
planFeedbackMethod · 0.45
planRefinerMethod · 0.45
tasksMethod · 0.45
refineTasksMethod · 0.45
combineMethod · 0.45
combine_v2Method · 0.45
feedbackMethod · 0.45
refineMethod · 0.45
finalMethod · 0.45

Calls 1

runMethod · 0.80

Tested by

no test coverage detected