Skip to content

Commit

Permalink
fix summary endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Feb 9, 2024
1 parent 417e730 commit f1f6adf
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions app/character.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def update(
if not self.knowledge_summary.strip():
self.knowledge_summary = summary(
SummaryRequest(text=self.knowledge)
).summary
)
options.append("A question about or reference to your knowledge")
knowledge_summary = (
f"You have the following knowledge: {self.knowledge_summary}"
Expand Down Expand Up @@ -554,6 +554,7 @@ def __init__(
self.sync()

def sync(self):
print("syncing character: ", self.character_id)
character_data = get_character_data(self.character_id)
logos_data = character_data.get("logosData")
name = character_data.get("name")
Expand All @@ -563,16 +564,7 @@ def sync(self):
concept = logos_data.get("concept")
abilities = logos_data.get("abilities")
creation_enabled = abilities.get("creations", True) if abilities else True

# temporary hack until this is in schema
if str(self.character_id) == "65b5d2932a094f8ee322cb69" or str(self.character_id) == "657aa5cd35eb16a8136493e5":
story_creation_enabled = True
else:
story_creation_enabled = False
print("story_creation_enabled: ", story_creation_enabled)

#story_creation_enabled = True #abilities.get("story_creations", False) if abilities else False

story_creation_enabled = abilities.get("story_creations", True) if abilities else True
smart_reply = abilities.get("smart_reply", False) if abilities else False
chat_model = logos_data.get("chatModel", "gpt-4-1106-preview")
image = character_data.get("image")
Expand Down

0 comments on commit f1f6adf

Please sign in to comment.