update dependences
This commit is contained in:
Generated
+27
-26
@@ -21,6 +21,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
|||||||
name = "aha"
|
name = "aha"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"aha_openai_dive",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"candle-core",
|
"candle-core",
|
||||||
@@ -33,7 +34,6 @@ dependencies = [
|
|||||||
"image",
|
"image",
|
||||||
"minijinja",
|
"minijinja",
|
||||||
"num",
|
"num",
|
||||||
"openai_dive",
|
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"rocket",
|
"rocket",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -43,6 +43,25 @@ dependencies = [
|
|||||||
"uuid",
|
"uuid",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "aha_openai_dive"
|
||||||
|
version = "1.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "45b54fac70f40807364efeb885a33150e163d86b9db687820ba3c5f06aeeaf6e"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"derive_builder",
|
||||||
|
"futures",
|
||||||
|
"reqwest",
|
||||||
|
"reqwest-eventsource",
|
||||||
|
"serde",
|
||||||
|
"serde_html_form",
|
||||||
|
"serde_json",
|
||||||
|
"tokio",
|
||||||
|
"tokio-stream",
|
||||||
|
"tokio-util",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ahash"
|
name = "ahash"
|
||||||
version = "0.8.12"
|
version = "0.8.12"
|
||||||
@@ -843,7 +862,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1643,7 +1662,7 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"socket2 0.5.10",
|
"socket2 0.6.1",
|
||||||
"system-configuration",
|
"system-configuration",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
@@ -1894,7 +1913,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"hermit-abi",
|
"hermit-abi",
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2253,7 +2272,7 @@ version = "0.50.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
|
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2423,24 +2442,6 @@ dependencies = [
|
|||||||
"pkg-config",
|
"pkg-config",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "openai_dive"
|
|
||||||
version = "1.3.3"
|
|
||||||
source = "git+https://github.com/jhqxxx/openai-client.git?tag=1.3.3#f799b7f28180f14e44425bb2df3e5cefc06e31ec"
|
|
||||||
dependencies = [
|
|
||||||
"bytes",
|
|
||||||
"derive_builder",
|
|
||||||
"futures",
|
|
||||||
"reqwest",
|
|
||||||
"reqwest-eventsource",
|
|
||||||
"serde",
|
|
||||||
"serde_html_form",
|
|
||||||
"serde_json",
|
|
||||||
"tokio",
|
|
||||||
"tokio-stream",
|
|
||||||
"tokio-util",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openssl"
|
name = "openssl"
|
||||||
version = "0.10.74"
|
version = "0.10.74"
|
||||||
@@ -3135,7 +3136,7 @@ dependencies = [
|
|||||||
"errno",
|
"errno",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys",
|
"linux-raw-sys",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3578,7 +3579,7 @@ dependencies = [
|
|||||||
"getrandom 0.3.4",
|
"getrandom 0.3.4",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustix",
|
"rustix",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4292,7 +4293,7 @@ version = "0.1.11"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ base64 = "0.22.1"
|
|||||||
num = "0.4.3"
|
num = "0.4.3"
|
||||||
minijinja = "2.12.0"
|
minijinja = "2.12.0"
|
||||||
tokenizers = "0.22.1"
|
tokenizers = "0.22.1"
|
||||||
openai_dive = { git = "https://github.com/jhqxxx/openai-client.git", version = "1.3.3", tag = "1.3.3", features = ["stream"]}
|
aha_openai_dive = {version = "1.3.2", features = ["stream"]}
|
||||||
uuid = { version = "1.18.1", features = ["v4"]}
|
uuid = { version = "1.18.1", features = ["v4"]}
|
||||||
chrono = "0.4.42"
|
chrono = "0.4.42"
|
||||||
rocket = "0.5.1"
|
rocket = "0.5.1"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
use aha_openai_dive::v1::resources::chat::ChatCompletionParameters;
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use minijinja::{Environment, Value as MiniJinjaValue, context};
|
use minijinja::{Environment, Value as MiniJinjaValue, context};
|
||||||
use openai_dive::v1::resources::chat::ChatCompletionParameters;
|
|
||||||
|
|
||||||
use crate::utils::string_to_static_str;
|
use crate::utils::string_to_static_str;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
use aha_openai_dive::v1::resources::chat::{
|
||||||
|
ChatCompletionChunkResponse, ChatCompletionParameters, ChatCompletionResponse,
|
||||||
|
};
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use candle_core::{DType, Device, Tensor};
|
use candle_core::{DType, Device, Tensor};
|
||||||
use candle_nn::VarBuilder;
|
use candle_nn::VarBuilder;
|
||||||
use openai_dive::v1::resources::chat::{
|
|
||||||
ChatCompletionChunkResponse, ChatCompletionParameters, ChatCompletionResponse,
|
|
||||||
};
|
|
||||||
use rocket::async_stream::stream;
|
use rocket::async_stream::stream;
|
||||||
use rocket::futures::Stream;
|
use rocket::futures::Stream;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -4,10 +4,10 @@ pub mod qwen2_5vl;
|
|||||||
pub mod qwen3vl;
|
pub mod qwen3vl;
|
||||||
pub mod voxcpm;
|
pub mod voxcpm;
|
||||||
|
|
||||||
use anyhow::Result;
|
use aha_openai_dive::v1::resources::chat::{
|
||||||
use openai_dive::v1::resources::chat::{
|
|
||||||
ChatCompletionChunkResponse, ChatCompletionParameters, ChatCompletionResponse,
|
ChatCompletionChunkResponse, ChatCompletionParameters, ChatCompletionResponse,
|
||||||
};
|
};
|
||||||
|
use anyhow::Result;
|
||||||
use rocket::futures::Stream;
|
use rocket::futures::Stream;
|
||||||
|
|
||||||
pub trait GenerateModel {
|
pub trait GenerateModel {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// use crate::models::GenerateStream;
|
// use crate::models::GenerateStream;
|
||||||
|
use aha_openai_dive::v1::resources::chat::{
|
||||||
|
ChatCompletionChunkResponse, ChatCompletionParameters, ChatCompletionResponse,
|
||||||
|
};
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use candle_core::{D, DType, Device, IndexOp, Tensor};
|
use candle_core::{D, DType, Device, IndexOp, Tensor};
|
||||||
use candle_nn::VarBuilder;
|
use candle_nn::VarBuilder;
|
||||||
use openai_dive::v1::resources::chat::{
|
|
||||||
ChatCompletionChunkResponse, ChatCompletionParameters, ChatCompletionResponse,
|
|
||||||
};
|
|
||||||
use rocket::async_stream::stream;
|
use rocket::async_stream::stream;
|
||||||
use rocket::futures::Stream;
|
use rocket::futures::Stream;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
use aha_openai_dive::v1::resources::chat::{
|
||||||
|
ChatCompletionParameters, ChatMessage, ChatMessageContent, ChatMessageContentPart,
|
||||||
|
};
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use candle_core::{DType, Device, IndexOp, Shape, Tensor};
|
use candle_core::{DType, Device, IndexOp, Shape, Tensor};
|
||||||
use ffmpeg_next as ffmpeg;
|
use ffmpeg_next as ffmpeg;
|
||||||
use image::DynamicImage;
|
use image::DynamicImage;
|
||||||
use num::integer::lcm;
|
use num::integer::lcm;
|
||||||
use openai_dive::v1::resources::chat::{
|
|
||||||
ChatCompletionParameters, ChatMessage, ChatMessageContent, ChatMessageContentPart,
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
models::qwen2_5vl::config::VisionSetting,
|
models::qwen2_5vl::config::VisionSetting,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
use aha_openai_dive::v1::resources::chat::{
|
||||||
|
ChatCompletionChunkResponse, ChatCompletionParameters, ChatCompletionResponse,
|
||||||
|
};
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use candle_core::{DType, Device, Tensor};
|
use candle_core::{DType, Device, Tensor};
|
||||||
use candle_nn::VarBuilder;
|
use candle_nn::VarBuilder;
|
||||||
use openai_dive::v1::resources::chat::{
|
|
||||||
ChatCompletionChunkResponse, ChatCompletionParameters, ChatCompletionResponse,
|
|
||||||
};
|
|
||||||
use rocket::async_stream::stream;
|
use rocket::async_stream::stream;
|
||||||
use rocket::futures::Stream;
|
use rocket::futures::Stream;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
use aha_openai_dive::v1::resources::chat::{
|
||||||
|
ChatCompletionParameters, ChatMessage, ChatMessageContent, ChatMessageContentPart,
|
||||||
|
};
|
||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use candle_core::{DType, Device, IndexOp, Shape, Tensor};
|
use candle_core::{DType, Device, IndexOp, Shape, Tensor};
|
||||||
use ffmpeg_next as ffmpeg;
|
use ffmpeg_next as ffmpeg;
|
||||||
use image::DynamicImage;
|
use image::DynamicImage;
|
||||||
use num::integer::lcm;
|
use num::integer::lcm;
|
||||||
use openai_dive::v1::resources::chat::{
|
|
||||||
ChatCompletionParameters, ChatMessage, ChatMessageContent, ChatMessageContentPart,
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
models::qwen3vl::config::PreprocessorConfig,
|
models::qwen3vl::config::PreprocessorConfig,
|
||||||
|
|||||||
+4
-4
@@ -3,10 +3,7 @@ pub mod img_utils;
|
|||||||
pub mod tensor_utils;
|
pub mod tensor_utils;
|
||||||
pub mod video_utils;
|
pub mod video_utils;
|
||||||
|
|
||||||
use anyhow::Result;
|
use aha_openai_dive::v1::resources::{
|
||||||
use candle_core::{DType, Device};
|
|
||||||
use candle_transformers::generation::{LogitsProcessor, Sampling};
|
|
||||||
use openai_dive::v1::resources::{
|
|
||||||
chat::{
|
chat::{
|
||||||
ChatCompletionChoice, ChatCompletionChunkChoice, ChatCompletionChunkResponse,
|
ChatCompletionChoice, ChatCompletionChunkChoice, ChatCompletionChunkResponse,
|
||||||
ChatCompletionResponse, ChatMessage, ChatMessageContent, DeltaChatMessage, DeltaFunction,
|
ChatCompletionResponse, ChatMessage, ChatMessageContent, DeltaChatMessage, DeltaFunction,
|
||||||
@@ -14,6 +11,9 @@ use openai_dive::v1::resources::{
|
|||||||
},
|
},
|
||||||
shared::FinishReason,
|
shared::FinishReason,
|
||||||
};
|
};
|
||||||
|
use anyhow::Result;
|
||||||
|
use candle_core::{DType, Device};
|
||||||
|
use candle_transformers::generation::{LogitsProcessor, Sampling};
|
||||||
|
|
||||||
pub fn get_device(device: Option<&Device>) -> Device {
|
pub fn get_device(device: Option<&Device>) -> Device {
|
||||||
match device {
|
match device {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
use std::{pin::pin, time::Instant};
|
use std::{pin::pin, time::Instant};
|
||||||
|
|
||||||
use aha::models::{GenerateModel, minicpm4::generate::MiniCPMGenerateModel};
|
use aha::models::{GenerateModel, minicpm4::generate::MiniCPMGenerateModel};
|
||||||
|
use aha_openai_dive::v1::resources::chat::ChatCompletionParameters;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use openai_dive::v1::resources::chat::ChatCompletionParameters;
|
|
||||||
use rocket::futures::StreamExt;
|
use rocket::futures::StreamExt;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
use std::{pin::pin, time::Instant};
|
use std::{pin::pin, time::Instant};
|
||||||
|
|
||||||
use aha::models::{GenerateModel, qwen2_5vl::generate::Qwen2_5VLGenerateModel};
|
use aha::models::{GenerateModel, qwen2_5vl::generate::Qwen2_5VLGenerateModel};
|
||||||
|
use aha_openai_dive::v1::resources::chat::ChatCompletionParameters;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use openai_dive::v1::resources::chat::ChatCompletionParameters;
|
|
||||||
use rocket::futures::StreamExt;
|
use rocket::futures::StreamExt;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
use std::{pin::pin, time::Instant};
|
use std::{pin::pin, time::Instant};
|
||||||
|
|
||||||
use aha::models::{GenerateModel, qwen3vl::generate::Qwen3VLGenerateModel};
|
use aha::models::{GenerateModel, qwen3vl::generate::Qwen3VLGenerateModel};
|
||||||
|
use aha_openai_dive::v1::resources::chat::ChatCompletionParameters;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use openai_dive::v1::resources::chat::ChatCompletionParameters;
|
|
||||||
use rocket::futures::StreamExt;
|
use rocket::futures::StreamExt;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user