Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix summary endpoint #26

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading