pull/59/head
Kye 1 year ago
parent aa2692bde8
commit 9628e0a10c

@ -20,4 +20,5 @@ optimized_prompt = meta_optimizer.run(task)
#run the optimized prompt with detailed instructions #run the optimized prompt with detailed instructions
result = worker.run(optimized_prompt) result = worker.run(optimized_prompt)
#print
print(result) print(result)

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

Loading…
Cancel
Save