Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Aug 30, 2023
1 parent 4b6aef4 commit 58cd0c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
15 changes: 8 additions & 7 deletions examples/chat_forever/console3.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

flatten = personas.descriptions

prolog = """You have been tasked writeing a Python-based gRPC service to reimplement the Clarifai GRPCAPI as open source and we will read line by line and translate into a new python Implementation of a gRPC service to implement it."""
prolog = """You have been tasked with creating a new version of this code to add in creative emojis to represent the internal activations and encodings of another neural network."""

MAXWORDS = len(prolog) + (256*2)

Expand Down Expand Up @@ -146,14 +146,15 @@ def read_input_file(self, file_path):

def gen_rewrite(self):
topic = "Protobuf api specification"
target= "Pytorch visualization using emojis"
return random.choice(
[
f"Rewrite this {topic} as a Python gRPC service implementation.",
f"Please provide an example of how you would implement a gRPC service for this {topic} using Python.",
f"Reshape the given {topic} into a gRPC service code snippet in Python.",
f"Transform this {topic} into a Python code representation of a gRPC service.",
f"Generate a Python code snippet for a gRPC service that implements this {topic}.",
f"Craft a Python implementation of a gRPC service that embodies the essence of this {topic}.",
f"Rewrite this {topic} as a {target} implementation.",
f"Please provide an example of how you would implement a {target} for this {topic} using Python.",
f"Reshape the given {topic} into a {target} code snippet in Python.",
f"Transform this {topic} into a Python code representation of a {target}.",
f"Generate a Python code snippet for a {target} that implements this {topic}.",
f"Craft a Python implementation of a {target} that embodies the essence of this {topic}.",
]
)

Expand Down
7 changes: 4 additions & 3 deletions examples/chat_forever/personas.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,15 @@ def __init__(self):
pclasses.append(globals()[name])

personas1 = base_persona.import_personas(filename="personas2.txt")
descriptions = []
descriptions = {}
for cls in pclasses:
if isinstance(cls, type) and issubclass(cls, Persona) and cls != Persona:
#name = cls.__name__
persona_instance = cls()
#print(persona_instance.describe())
descriptions.append(persona_instance.describe())
descriptions[persona_instance.name] =persona_instance.describe()
for name in personas1:
de = name.describe()
descriptions.append(de)
#descriptions.append(de)
descriptions[name.name] =de

0 comments on commit 58cd0c0

Please sign in to comment.