style: fmt the project (#54)

add rustfmt.toml

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
This commit is contained in:
jokemanfire 2025-03-28 23:50:46 +08:00 • committed by GitHub
commit 0a2f13a1f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 158 additions and 132 deletions

View file

@ -1,11 +1,12 @@
use std::ops::{Deref, DerefMut};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use super::{
RawContent, RawEmbeddedResource, RawImageContent, RawResource, RawResourceTemplate,
RawTextContent, Role,
};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]

View file

@ -1,8 +1,9 @@
use super::JsonObject;
use std::{collections::BTreeMap, marker::PhantomData};
use paste::paste;
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
use std::marker::PhantomData;
use super::JsonObject;
pub type ExperimentalCapabilities = BTreeMap<String, JsonObject>;
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]

View file

@ -1,11 +1,11 @@
//! Content sent around agents, extensions, and LLMs
//! The various content types can be display to humans but also understood by models
//! They include optional annotations used to help inform agent usage
use super::resource::ResourceContents;
use super::{AnnotateAble, Annotated};
use serde::{Deserialize, Serialize};
use serde_json::json;
use super::{AnnotateAble, Annotated, resource::ResourceContents};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RawTextContent {

View file

@ -1,9 +1,12 @@
use super::content::{EmbeddedResource, ImageContent};
use super::resource::ResourceContents;
use super::{AnnotateAble, Annotations, RawEmbeddedResource, RawImageContent};
use base64::engine::{Engine, general_purpose::STANDARD as BASE64_STANDARD};
use serde::{Deserialize, Serialize};
use super::{
AnnotateAble, Annotations, RawEmbeddedResource, RawImageContent,
content::{EmbeddedResource, ImageContent},
resource::ResourceContents,
};
/// A prompt that can be used to generate text from a model
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]