You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running this in GitHub or any Jupyter flavor with the usual frontends:
<detailsopen>
- id: 'msg_01J9h95kubV9fAA66i6q9kzD'
- content: [{'text': "Hello Vic, it's nice to meet you. How can I assist you today?", 'type': 'text'}]- model: 'claude-3-5-sonnet-20240620'
- role: 'assistant'
- stop_reason: 'end_turn'
- stop_sequence: None
- type: 'message'
- usage: {'input_tokens': 19, 'output_tokens': 21}
</details>
you get:
id: 'msg_01J9h95kubV9fAA66i6q9kzD'
content: [{'text': "Hello Vic, it's nice to meet you. How can I assist you today?", 'type': 'text'}]
model: 'claude-3-5-sonnet-20240620'
role: 'assistant'
stop_reason: 'end_turn'
stop_sequence: None
type: 'message'
usage: {'input_tokens': 19, 'output_tokens': 21}
As expected. But running the same cell in VSCode 1.91.1 we get an empty usage field:
id: 'msg_01J9h95kubV9fAA66i6q9kzD'
content: [{'text': "Hello Vic, it's nice to meet you. How can I assist you today?", 'type': 'text'}]
model: 'claude-3-5-sonnet-20240620'
role: 'assistant'
stop_reason: 'end_turn'
stop_sequence: None
type: 'message'
usage:
with this generated HTML:
<detailsopen=""><ul>
...
<li>content: [{'text': "Hello Vic, it's nice to meet you. How can I assist you today?", 'type': 'text'}]</li>
...
<li>type: 'message'</li><liinput_tokens:="" 19,="" output_tokens:="" 21="">usage:</li></ul></details>
This is VSCode frontend being really weird (a bug, really), The <detail>Details disclosure widget seems well supported by all browsers except VSCode notebooks.
I can open an issue with VSCode, or just add two characters to 00_core.ipnbMessage._repr_markdown:
Running this in GitHub or any Jupyter flavor with the usual frontends:
you get:
As expected. But running the same cell in VSCode 1.91.1 we get an empty
usage
field:with this generated HTML:
This is VSCode frontend being really weird (a bug, really), The
<detail>
Details disclosure widget seems well supported by all browsers except VSCode notebooks.I can open an issue with VSCode, or just add two characters to
00_core.ipnb
Message._repr_markdown
:to get this:
'msg_01J9h95kubV9fAA66i6q9kzD'
[{'text': "Hello Vic, it's nice to meet you. How can I assist you today?", 'type': 'text'}]
'claude-3-5-sonnet-20240620'
'assistant'
'end_turn'
None
'message'
{'input_tokens': 19, 'output_tokens': 21}
that IMHO is more legible, equally robust and compatible with this and future versions of VSCode.
The text was updated successfully, but these errors were encountered: