mirror of
https://github.com/perstarkse/minne.git
synced 2026-07-08 22:05:15 +02:00
chore: dependabot deps update
chore: openai version bump
This commit is contained in:
@@ -3,7 +3,7 @@ use std::{
|
||||
sync::{Arc, OnceLock},
|
||||
};
|
||||
|
||||
use async_openai::types::{
|
||||
use async_openai::types::chat::{
|
||||
ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage,
|
||||
CreateChatCompletionRequest, CreateChatCompletionRequestArgs, ResponseFormat,
|
||||
ResponseFormatJsonSchema,
|
||||
@@ -111,7 +111,7 @@ impl DefaultPipelineServices {
|
||||
json_schema: ResponseFormatJsonSchema {
|
||||
description: Some("Structured analysis of the submitted content".into()),
|
||||
name: "content_analysis".into(),
|
||||
schema: Some(get_ingress_analysis_schema()),
|
||||
schema: get_ingress_analysis_schema(),
|
||||
strict: Some(true),
|
||||
},
|
||||
};
|
||||
@@ -358,7 +358,7 @@ mod tests {
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Context;
|
||||
use async_openai::{config::OpenAIConfig, types::ChatCompletionRequestMessage, Client};
|
||||
use async_openai::{config::OpenAIConfig, types::chat::ChatCompletionRequestMessage, Client};
|
||||
use common::{
|
||||
storage::{
|
||||
db::SurrealDbClient, store::StorageManager, types::system_settings::SystemSettingsPatch,
|
||||
@@ -375,12 +375,12 @@ mod tests {
|
||||
use common::error::AppError;
|
||||
|
||||
fn system_prompt_from_request(
|
||||
request: &async_openai::types::CreateChatCompletionRequest,
|
||||
request: &async_openai::types::chat::CreateChatCompletionRequest,
|
||||
) -> anyhow::Result<String> {
|
||||
let Some(ChatCompletionRequestMessage::System(system)) = request.messages.first() else {
|
||||
anyhow::bail!("expected first message to be system");
|
||||
};
|
||||
let async_openai::types::ChatCompletionRequestSystemMessageContent::Text(text) =
|
||||
let async_openai::types::chat::ChatCompletionRequestSystemMessageContent::Text(text) =
|
||||
&system.content
|
||||
else {
|
||||
anyhow::bail!("unexpected system message content: {:?}", system.content);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use async_openai::types::{AudioResponseFormat, CreateTranscriptionRequestArgs};
|
||||
use async_openai::types::audio::{AudioResponseFormat, CreateTranscriptionRequestArgs};
|
||||
use common::{
|
||||
error::AppError,
|
||||
storage::{db::SurrealDbClient, types::system_settings::SystemSettings},
|
||||
@@ -21,7 +21,8 @@ pub async fn transcribe_audio_file(
|
||||
|
||||
let response = openai_client
|
||||
.audio()
|
||||
.transcribe(request)
|
||||
.transcription()
|
||||
.create(request)
|
||||
.await
|
||||
.map_err(|e| AppError::Processing(format!("Audio transcription failed: {e}")))?;
|
||||
Ok(response.text)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use async_openai::types::{
|
||||
use async_openai::types::chat::{
|
||||
ChatCompletionRequestMessageContentPartImageArgs,
|
||||
ChatCompletionRequestMessageContentPartTextArgs, ChatCompletionRequestUserMessageArgs,
|
||||
CreateChatCompletionRequestArgs, ImageDetail, ImageUrlArgs,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Vision-LLM transcription of rendered PDF pages into Markdown.
|
||||
|
||||
use async_openai::types::{
|
||||
use async_openai::types::chat::{
|
||||
ChatCompletionRequestMessageContentPartImageArgs,
|
||||
ChatCompletionRequestMessageContentPartTextArgs, ChatCompletionRequestUserMessageArgs,
|
||||
CreateChatCompletionRequest, CreateChatCompletionRequestArgs, ImageDetail, ImageUrlArgs,
|
||||
|
||||
Reference in New Issue
Block a user