Merge branch 'master' into dr-support-pip-cm

This commit is contained in:
Dr.Lt.Data 2025-08-23 06:46:25 +09:00
commit 47350d323a
3 changed files with 28 additions and 5 deletions

View File

@ -5,7 +5,10 @@ See: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/infer
from __future__ import annotations from __future__ import annotations
import json
import time
import os import os
import uuid
from enum import Enum from enum import Enum
from typing import Optional, Literal from typing import Optional, Literal
@ -350,7 +353,27 @@ class GeminiNode(ComfyNodeABC):
# Get result output # Get result output
output_text = self.get_text_from_response(response) output_text = self.get_text_from_response(response)
if unique_id and output_text: if unique_id and output_text:
PromptServer.instance.send_progress_text(output_text, node_id=unique_id) # Not a true chat history like the OpenAI Chat node. It is emulated so the frontend can show a copy button.
render_spec = {
"node_id": unique_id,
"component": "ChatHistoryWidget",
"props": {
"history": json.dumps(
[
{
"prompt": prompt,
"response": output_text,
"response_id": str(uuid.uuid4()),
"timestamp": time.time(),
}
]
),
},
}
PromptServer.instance.send_sync(
"display_component",
render_spec,
)
return (output_text or "Empty response from Gemini model...",) return (output_text or "Empty response from Gemini model...",)

View File

@ -998,7 +998,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"OpenAIDalle2": "OpenAI DALL·E 2", "OpenAIDalle2": "OpenAI DALL·E 2",
"OpenAIDalle3": "OpenAI DALL·E 3", "OpenAIDalle3": "OpenAI DALL·E 3",
"OpenAIGPTImage1": "OpenAI GPT Image 1", "OpenAIGPTImage1": "OpenAI GPT Image 1",
"OpenAIChatNode": "OpenAI Chat", "OpenAIChatNode": "OpenAI ChatGPT",
"OpenAIInputFiles": "OpenAI Chat Input Files", "OpenAIInputFiles": "OpenAI ChatGPT Input Files",
"OpenAIChatConfig": "OpenAI Chat Advanced Options", "OpenAIChatConfig": "OpenAI ChatGPT Advanced Options",
} }

View File

@ -1,5 +1,5 @@
comfyui-frontend-package==1.25.9 comfyui-frontend-package==1.25.9
comfyui-workflow-templates==0.1.62 comfyui-workflow-templates==0.1.65
comfyui-embedded-docs==0.2.6 comfyui-embedded-docs==0.2.6
comfyui_manager==4.0.0b13 comfyui_manager==4.0.0b13
torch torch