mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 09:50:21 +08:00
refactor ai formats registry adapters
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::{
|
||||
canonical::{
|
||||
canonical_to_claude_response, from_claude_to_canonical_response, CanonicalResponse,
|
||||
},
|
||||
context::FormatContext,
|
||||
};
|
||||
|
||||
pub fn from(body: &Value, _ctx: &FormatContext) -> Option<CanonicalResponse> {
|
||||
from_claude_to_canonical_response(body)
|
||||
}
|
||||
|
||||
pub fn to(response: &CanonicalResponse, _ctx: &FormatContext) -> Option<Value> {
|
||||
Some(canonical_to_claude_response(response))
|
||||
}
|
||||
Reference in New Issue
Block a user