Skip to content

Commit

Permalink
chore: remove cost calculation, enahnce logging
Browse files Browse the repository at this point in the history
Co-authored-by: Bartłomiej Boczek <[email protected]>
  • Loading branch information
maciejmajek and boczekbartek committed Sep 4, 2024
1 parent 6f79aae commit fd5432c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/rai/rai/cli/rai_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,21 @@ def build_robot_identity():
documentation = str([doc.page_content for doc in docs])
n_tokens = len(documentation) // 4.0
logger.info(
"Building the robot docs vector store... "
f"The documentation's length is {len(documentation)} chars, "
f"approximately {n_tokens} tokens"
)
logger.warn(
f"Building the robot docs vector store will cost "
f"approximately {n_tokens / 1_000_000 * 0.1:.4f}$. "
"Do you want to continue? (y/n)"
)
logger.warn("Do you want to continue? (y/n)")
if input() == "y":
build_docs_vector_store()
else:
logger.info("Skipping the robot docs vector store creation.")

logger.warn(
f"Building the robot identity will cost "
f"approximately {n_tokens / 1_000_000 * 0.15:.4f}$. "
"Do you want to continue? (y/n)"
logger.info(
"Building the robot identity... "
"You can do it manually by creating {save_dir}/robot_identity.txt "
)
logger.warn("Do you want to continue? (y/n)")
if input() == "y":
build_robot_identity()
else:
Expand Down

0 comments on commit fd5432c

Please sign in to comment.