Improving logging in oai.completion to show token_count (#179)

* update

* update doc

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
This commit is contained in:
Yiran Wu
2023-10-12 10:31:52 -04:00
committed by GitHub
parent 6b14bd6609
commit b61aeb6cce
3 changed files with 62 additions and 0 deletions

View File

@@ -148,9 +148,11 @@ print('Hello world!')
```""",
)
print(conversations)
autogen.ChatCompletion.print_usage_summary()
autogen.ChatCompletion.start_logging(compact=False)
user.send("""Execute temp.py""", assistant)
print(autogen.ChatCompletion.logged_history)
autogen.ChatCompletion.print_usage_summary()
autogen.ChatCompletion.stop_logging()