mirror of
https://github.com/openai/harmony.git
synced 2025-08-23 01:17:09 -04:00
Merge branch 'main' into dev/scl/better-ci
This commit is contained in:
commit
6375a15ea1
2 changed files with 161 additions and 161 deletions
3
LICENSE
3
LICENSE
|
@ -1,3 +1,4 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
@ -186,7 +187,7 @@ APPENDIX: How to apply the Apache License to your work.
|
|||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2025 OpenAI
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -235,7 +235,7 @@ impl JsStreamableParser {
|
|||
pub fn new(encoding: &JsHarmonyEncoding, role: &str) -> Result<JsStreamableParser, JsValue> {
|
||||
let parsed_role = Role::try_from(role)
|
||||
.map_err(|_| JsValue::from_str(&format!("unknown role: {role}")))?;
|
||||
let inner = StreamableParser::new(encoding.inner.clone(), parsed_role)
|
||||
let inner = StreamableParser::new(encoding.inner.clone(), Some(parsed_role))
|
||||
.map_err(|e| JsValue::from_str(&e.to_string()))?;
|
||||
Ok(Self { inner })
|
||||
}
|
||||
|
@ -323,9 +323,8 @@ pub async fn load_harmony_encoding(
|
|||
let parsed: HarmonyEncodingName = name
|
||||
.parse::<HarmonyEncodingName>()
|
||||
.map_err(|e| JsValue::from_str(&e.to_string()))?;
|
||||
let encoding = inner_load_harmony_encoding(parsed)
|
||||
.await
|
||||
.map_err(|e| JsValue::from_str(&e.to_string()))?;
|
||||
let encoding =
|
||||
inner_load_harmony_encoding(parsed).map_err(|e| JsValue::from_str(&e.to_string()))?;
|
||||
Ok(JsHarmonyEncoding { inner: encoding })
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue