Skip to content

Commit

Permalink
Updating starters
Browse files Browse the repository at this point in the history
  • Loading branch information
ckrapu-nv committed Oct 17, 2024
1 parent 8f5d6dc commit 256cc20
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions community/routing-multisource-rag/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ async def on_chat_start():
async def set_starters():
return [
cl.Starter(
label="Compare GPU specifications",
message="Write a table with up to 10 rows comparing the technical specs for the A100 and H100 GPUs",
label="Write a haiku about CPUs",
message="Write a haiku about CPUs.",
icon="/avatars/servers",
),
cl.Starter(
Expand Down Expand Up @@ -103,13 +103,6 @@ async def main(user_message: cl.Message, count_tokens: bool = True):
)

msg_time = time.time() - msg_start_time
if count_tokens:
token_count = len(Settings.tokenizer(assistant_message.content))
assistant_message.content += ""
assistant_message.content += "<small style='font-size: 70%; opacity: 0.5'>{} tokens generated in {:.1f} s. </small>".format(
token_count, msg_time
)

logging.info(f"Message generated in {msg_time:.1f} seconds.")

message_history += [
Expand Down

0 comments on commit 256cc20

Please sign in to comment.