Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
drudilorenzo authored May 28, 2024
1 parent 8c0ae6e commit 2f63ce5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ How to install:
from openai_cost_logger import OpenAICostLogger
from openai_cost_logger import OpenAICostLoggerViz
from openai_cost_logger import OpenAICostLoggerUtils
from openai_cost_logger import OpenAICostLogger_Singleton
from openai_cost_logger import DEFAULT_LOG_PATH, MODELS_COST

Key Features:
Expand All @@ -31,12 +32,12 @@ Key Features:

Models supported:
-------------------
* The response generation is totally up to the user. The library support every model which response contains the fields **usage.prompt_tokens** and **usage.total_tokens** (e.g. chat completions, embeddings, etc.).
* The generation of responses is totally up to the user. The library supports every model whose response contains the fields **usage.prompt_tokens** and **usage.total_tokens** (e.g. chat completions, embeddings, etc.).

Multithreading:
---------------
* Be aware that the classic cost logger is not thread-safe.
* If you want to use it in a multithreading environment, you should use the **thread-safe** version of the logger: **OpenAICostLogger_Singleton**. The interface is the same as the classic logger. This will prevent multiple threads from writing to the same file at the same time.
* If you want to use it in a multithreading environment, you should use the **thread-safe** version of the logger: ``OpenAICostLogger_Singleton``. The interface is the same as the classic logger. This will prevent multiple threads from writing to the same file at the same time.

Note:
-----
Expand Down

0 comments on commit 2f63ce5

Please sign in to comment.