Better naming
This commit is contained in:
parent
ee9fbf1f03
commit
c162d76fc1
2 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ use language_model::{
|
|||
LanguageModelToolUse, MessageContent, RateLimiter, Role, StopReason, TokenUsage,
|
||||
};
|
||||
use open_router::{
|
||||
Model, ModelMode as OpenRouterModelMode, ProviderOptions, ResponseStreamEvent, list_models,
|
||||
Model, ModelMode as OpenRouterModelMode, Provider, ResponseStreamEvent, list_models,
|
||||
stream_completion,
|
||||
};
|
||||
use schemars::JsonSchema;
|
||||
|
@ -50,7 +50,7 @@ pub struct AvailableModel {
|
|||
pub supports_tools: Option<bool>,
|
||||
pub supports_images: Option<bool>,
|
||||
pub mode: Option<ModelMode>,
|
||||
pub provider: Option<ProviderOptions>,
|
||||
pub provider: Option<Provider>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
|
|
|
@ -28,7 +28,7 @@ impl Default for DataCollection {
|
|||
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ProviderOptions {
|
||||
pub struct Provider {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
order: Option<Vec<String>>,
|
||||
#[serde(default = "default_true")]
|
||||
|
@ -91,7 +91,7 @@ pub struct Model {
|
|||
pub supports_images: Option<bool>,
|
||||
#[serde(default)]
|
||||
pub mode: ModelMode,
|
||||
pub provider: Option<ProviderOptions>,
|
||||
pub provider: Option<Provider>,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
|
@ -128,7 +128,7 @@ impl Model {
|
|||
supports_tools: Option<bool>,
|
||||
supports_images: Option<bool>,
|
||||
mode: Option<ModelMode>,
|
||||
provider: Option<ProviderOptions>,
|
||||
provider: Option<Provider>,
|
||||
) -> Self {
|
||||
Self {
|
||||
name: name.to_owned(),
|
||||
|
@ -185,7 +185,7 @@ pub struct Request {
|
|||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub reasoning: Option<Reasoning>,
|
||||
pub usage: RequestUsage,
|
||||
pub provider: Option<ProviderOptions>,
|
||||
pub provider: Option<Provider>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue