Skip to content

Commit

Permalink
fix claude title call
Browse files Browse the repository at this point in the history
  • Loading branch information
brainboost committed May 13, 2024
1 parent 431af3f commit 6385379
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions engines/claude.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,20 +250,18 @@ def __get_organization():

def __set_title(prompt: str, conversation_id: str) -> str:
payload = {
"organization_uuid": organization_id,
"conversation_uuid": conversation_id,
"message_content": prompt,
"recent_titles": [],
}
response = requests.post(
url=f"{base_url}/api/generate_chat_title",
url=f"{base_url}/api/organizations/{organization_id}/chat_conversations/{conversation_id}/title",
headers=headers,
data=json.dumps(payload),
impersonate=browser_version,
)
if not response.ok:
logging.error(response.text)
raise Exception(f"Error response {response.text}")
return "Untitled"
title = response.json()["title"]
logging.info(f"Title set to '{title}")
return title
Expand Down

0 comments on commit 6385379

Please sign in to comment.