|
|
|
@ -2,6 +2,7 @@ from langchain.chains import LLMChain
|
|
|
|
|
from langchain.prompts import PromptTemplate
|
|
|
|
|
from langchain.memory import ConversationBufferWindowMemory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MetaPrompterAgent:
|
|
|
|
|
"""
|
|
|
|
|
Meta Prompting Agent
|
|
|
|
@ -51,6 +52,7 @@ class MetaPrompterAgent:
|
|
|
|
|
|
|
|
|
|
print(result)
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(
|
|
|
|
|
self,
|
|
|
|
|
llm,
|
|
|
|
@ -138,8 +140,6 @@ class MetaPrompterAgent:
|
|
|
|
|
print(f"Assistant: {output}")
|
|
|
|
|
print(f"Human: ")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.human_input:
|
|
|
|
|
human_input = input()
|
|
|
|
|
|
|
|
|
@ -161,5 +161,3 @@ class MetaPrompterAgent:
|
|
|
|
|
self.instructions = self.get_new_instructions(meta_output)
|
|
|
|
|
print(f"New Instruction: {self.instructions}")
|
|
|
|
|
print("\n" + "#" * 80 + "\n")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|