switchyard-translation 0.4.0

Pure Rust request, response, and stream translation for Switchyard
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

//! OpenAI Chat Completions buffered and streaming codecs.

mod buffered;
mod stream;

pub use buffered::OpenAiChatCodec;
pub use stream::OpenAiChatStreamCodec;

pub(crate) use buffered::{decode_file_source, decode_image_source};

// Temperature range: 0.0..=2.0.
// https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create
pub(crate) const MAX_TEMPERATURE: f64 = 2.0;