mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
refactor(core): remove comments from geminiChat.ts (#834)
This commit is contained in:
@@ -54,7 +54,6 @@ function isValidContent(content: Content): boolean {
|
|||||||
* @throws Error if the history does not start with a user turn.
|
* @throws Error if the history does not start with a user turn.
|
||||||
* @throws Error if the history contains an invalid role.
|
* @throws Error if the history contains an invalid role.
|
||||||
*/
|
*/
|
||||||
// hello keith
|
|
||||||
function validateHistory(history: Content[]) {
|
function validateHistory(history: Content[]) {
|
||||||
// Empty history is valid.
|
// Empty history is valid.
|
||||||
if (history.length === 0) {
|
if (history.length === 0) {
|
||||||
@@ -148,7 +147,6 @@ export class GeminiChat {
|
|||||||
* console.log(response.text);
|
* console.log(response.text);
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
// hello keith
|
|
||||||
async sendMessage(
|
async sendMessage(
|
||||||
params: SendMessageParameters,
|
params: SendMessageParameters,
|
||||||
): Promise<GenerateContentResponse> {
|
): Promise<GenerateContentResponse> {
|
||||||
@@ -218,7 +216,6 @@ export class GeminiChat {
|
|||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
// hello keith
|
|
||||||
async sendMessageStream(
|
async sendMessageStream(
|
||||||
params: SendMessageParameters,
|
params: SendMessageParameters,
|
||||||
): Promise<AsyncGenerator<GenerateContentResponse>> {
|
): Promise<AsyncGenerator<GenerateContentResponse>> {
|
||||||
@@ -281,7 +278,6 @@ export class GeminiChat {
|
|||||||
* @return History contents alternating between user and model for the entire
|
* @return History contents alternating between user and model for the entire
|
||||||
* chat session.
|
* chat session.
|
||||||
*/
|
*/
|
||||||
// hello keith
|
|
||||||
getHistory(curated: boolean = false): Content[] {
|
getHistory(curated: boolean = false): Content[] {
|
||||||
const history = curated
|
const history = curated
|
||||||
? extractCuratedHistory(this.history)
|
? extractCuratedHistory(this.history)
|
||||||
|
|||||||
Reference in New Issue
Block a user