mirror of
https://github.com/openai/harmony.git
synced 2025-08-23 10:17:08 -04:00
docs: update code example
This commit is contained in:
parent
088321b872
commit
e21d67af61
1 changed files with 2 additions and 7 deletions
|
@ -52,13 +52,8 @@ encoding = load_harmony_encoding(HarmonyEncodingName.HARMONY_GPT_OSS)
|
|||
|
||||
system_message = (
|
||||
SystemContent.new()
|
||||
.with_model_identity(
|
||||
"You are ChatGPT, a large language model trained by OpenAI."
|
||||
)
|
||||
.with_reasoning_effort(ReasoningEffort.HIGH)
|
||||
.with_conversation_start_date("2025-06-28")
|
||||
.with_knowledge_cutoff("2024-06")
|
||||
.with_required_channels(["analysis", "commentary", "final"])
|
||||
)
|
||||
|
||||
developer_message = (
|
||||
|
@ -101,11 +96,11 @@ convo = Conversation.from_messages(
|
|||
Message.from_role_and_content(Role.ASSISTANT, '{"location": "Tokyo"}')
|
||||
.with_channel("commentary")
|
||||
.with_recipient("functions.get_weather")
|
||||
.with_content_type("json"),
|
||||
.with_content_type("<|constrain|> json"),
|
||||
Message.from_author_and_content(
|
||||
Author.new(Role.TOOL, "functions.lookup_weather"),
|
||||
'{ "temperature": 20, "sunny": true }',
|
||||
),
|
||||
).with_channel("commentary"),
|
||||
]
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue