Unverified Commit 0c50a233 authored by Graham King's avatar Graham King Committed by GitHub
Browse files

chore: Remove Clone / Sync from DeltaGenerator (#2598)

parent 923e1ee7
// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. // SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use anyhow::Result; use anyhow::Result;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
...@@ -194,8 +182,8 @@ impl<T: OpenAIOutputOptionsProvider> OutputOptionsProvider for T { ...@@ -194,8 +182,8 @@ impl<T: OpenAIOutputOptionsProvider> OutputOptionsProvider for T {
} }
} }
pub trait DeltaGeneratorExt<ResponseType: Send + Sync + 'static + std::fmt::Debug>: pub trait DeltaGeneratorExt<ResponseType: Send + 'static + std::fmt::Debug>:
Send + Sync + 'static Send + 'static
{ {
fn choice_from_postprocessor( fn choice_from_postprocessor(
&mut self, &mut self,
......
// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. // SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use super::{NvCreateChatCompletionRequest, NvCreateChatCompletionStreamResponse}; use super::{NvCreateChatCompletionRequest, NvCreateChatCompletionStreamResponse};
use crate::{ use crate::{
...@@ -46,7 +34,7 @@ pub struct DeltaGeneratorOptions { ...@@ -46,7 +34,7 @@ pub struct DeltaGeneratorOptions {
} }
/// Generates incremental chat completion responses in a streaming fashion. /// Generates incremental chat completion responses in a streaming fashion.
#[derive(Debug, Clone)] #[derive(Debug)]
pub struct DeltaGenerator { pub struct DeltaGenerator {
/// Unique identifier for the chat completion session. /// Unique identifier for the chat completion session.
id: String, id: String,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment