pub struct ProviderSpecificResponse(pub Map<String, Value>);Expand description
Provider-specific response format. Examples:
OpenAI GET /v1/models?provider=openai response:
{
"provider": "openai",
"object": "list",
"data": [
{
"id": "gpt-4",
"object": "model",
"created": 1687882410,
"owned_by": "openai",
"served_by": "openai"
}
]
}Anthropic GET /v1/models?provider=anthropic response:
{
"provider": "anthropic",
"object": "list",
"data": [
{
"id": "gpt-4",
"object": "model",
"created": 1687882410,
"owned_by": "openai",
"served_by": "openai"
}
]
}JSON schema
{
"description": "Provider-specific response format. Examples:\n\nOpenAI GET /v1/models?provider=openai response:\n```json\n{\n \"provider\": \"openai\",\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"gpt-4\",\n \"object\": \"model\",\n \"created\": 1687882410,\n \"owned_by\": \"openai\",\n \"served_by\": \"openai\"\n }\n ]\n}\n```\n\nAnthropic GET /v1/models?provider=anthropic response:\n```json\n{\n \"provider\": \"anthropic\",\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"gpt-4\",\n \"object\": \"model\",\n \"created\": 1687882410,\n \"owned_by\": \"openai\",\n \"served_by\": \"openai\"\n }\n ]\n}\n```\n",
"type": "object"
}Tuple Fields§
§0: Map<String, Value>Methods from Deref<Target = Map<String, Value>>§
Sourcepub fn get<Q>(&self, key: &Q) -> Option<&Value>
pub fn get<Q>(&self, key: &Q) -> Option<&Value>
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Sourcepub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn contains_key<Q>(&self, key: &Q) -> bool
Returns true if the map contains a value for the specified key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Trait Implementations§
Source§impl Clone for ProviderSpecificResponse
impl Clone for ProviderSpecificResponse
Source§fn clone(&self) -> ProviderSpecificResponse
fn clone(&self) -> ProviderSpecificResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProviderSpecificResponse
impl Debug for ProviderSpecificResponse
Source§impl Deref for ProviderSpecificResponse
impl Deref for ProviderSpecificResponse
Source§impl<'de> Deserialize<'de> for ProviderSpecificResponse
impl<'de> Deserialize<'de> for ProviderSpecificResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProviderSpecificResponse
impl RefUnwindSafe for ProviderSpecificResponse
impl Send for ProviderSpecificResponse
impl Sync for ProviderSpecificResponse
impl Unpin for ProviderSpecificResponse
impl UnsafeUnpin for ProviderSpecificResponse
impl UnwindSafe for ProviderSpecificResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more