mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Rename server->core (#638)
This commit is contained in:
committed by
GitHub
parent
c81148a0cc
commit
21fba832d1
17
packages/core/src/utils/generateContentResponseUtilities.ts
Normal file
17
packages/core/src/utils/generateContentResponseUtilities.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { GenerateContentResponse } from '@google/genai';
|
||||
|
||||
export function getResponseText(
|
||||
response: GenerateContentResponse,
|
||||
): string | undefined {
|
||||
return (
|
||||
response.candidates?.[0]?.content?.parts
|
||||
?.map((part) => part.text)
|
||||
.join('') || undefined
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user