feat: summarize rss messages to feishu group #1
@@ -33,4 +33,4 @@ pub async fn request_model(
|
|||||||
let body = response.text().await?;
|
let body = response.text().await?;
|
||||||
|
|
||||||
Ok(body)
|
Ok(body)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
pub(crate) mod client;
|
pub(crate) mod client;
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ impl Config {
|
|||||||
|
|
||||||
Ok(config)
|
Ok(config)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
|
pub mod feishu;
|
||||||
pub mod summary;
|
pub mod summary;
|
||||||
pub mod feishu;
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
mod api;
|
mod api;
|
||||||
mod config;
|
mod config;
|
||||||
mod models;
|
|
||||||
mod controls;
|
mod controls;
|
||||||
|
mod models;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#[derive(Debug, serde::Serialize, serde::Deserialize)]
|
#[derive(Debug, serde::Serialize, serde::Deserialize)]
|
||||||
pub struct MessageContent {
|
pub struct MessageContent {
|
||||||
pub text: String,
|
pub text: String,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
|
pub mod feishu;
|
||||||
pub mod silicon_cloud;
|
pub mod silicon_cloud;
|
||||||
pub mod summary;
|
pub mod summary;
|
||||||
pub mod feishu;
|
|
||||||
@@ -7,7 +7,7 @@ pub struct Content {
|
|||||||
pub struct ModelResponse {
|
pub struct ModelResponse {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub content: Vec<Content>,
|
pub content: Vec<Content>,
|
||||||
pub model: String
|
pub model: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ModelResponse {
|
impl ModelResponse {
|
||||||
@@ -15,4 +15,4 @@ impl ModelResponse {
|
|||||||
let prase_response: ModelResponse = serde_json::from_str(&response)?;
|
let prase_response: ModelResponse = serde_json::from_str(&response)?;
|
||||||
Ok(prase_response)
|
Ok(prase_response)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ pub struct Summary {
|
|||||||
|
|
||||||
impl Summary {
|
impl Summary {
|
||||||
pub fn new(name: String, description: String) -> Self {
|
pub fn new(name: String, description: String) -> Self {
|
||||||
Self {
|
Self { name, description }
|
||||||
name,
|
|
||||||
description,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user