Aside from setting stream via response_mode in the API call, are there any other places where stream can be configured? #21906

Open
opened 2026-02-21 20:14:49 -05:00 by yindo · 0 comments
Owner

Originally created by @guanhd on GitHub (Jan 26, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

I am customizing a large model plugin. Where can I input the stream parameter?
Aside from setting stream via response_mode in the API call, are there any other places where stream can be configured?

I tried when calling the workflow API
"response_mode": "streaming" and "response_mode": "blocking", the stream obtained in the following methods of the plugin is always True
def _invoke(
self,
model: str,
credentials: dict,
prompt_messages: list[PromptMessage],
model_parameters: dict,
tools: Optional[list[PromptMessageTool]] = None,
stop: Optional[list[str]] = None,
stream: bool = True,
user: Optional[str] = None,
) -> Union[LLMResult, Generator]:

2. Additional context or comments

----------------the code is ------------------------
import logging
import json
from collections.abc import Generator
from typing import Any, Optional, Union, cast
from yarl import URL
from urllib.parse import urljoin
import requests
from pydantic import TypeAdapter, ValidationError
from dify_plugin import OAICompatLargeLanguageModel
from dify_plugin.entities import I18nObject
from dify_plugin.errors.model import (
CredentialsValidateFailedError,
)
from dify_plugin.entities.model import (
AIModelEntity,
FetchFrom,
ModelType,
)
from dify_plugin.entities.model.llm import (
LLMResult,
LLMMode,
LLMResultChunk,
LLMResultChunkDelta,
)
from dify_plugin.entities.model.message import (
PromptMessage,
PromptMessageTool,
PromptMessageFunction,
AssistantPromptMessage,
)
from dify_plugin.errors.model import (
CredentialsValidateFailedError,
InvokeAuthorizationError,
InvokeBadRequestError,
InvokeConnectionError,
InvokeError,
InvokeRateLimitError,
InvokeServerUnavailableError,
)
import codecs

import time
from util.crypt_utils import CryptUtils

logger = logging.getLogger(name)

class ModelLargeLanguageModel(OAICompatLargeLanguageModel):
"""
Model class for modeltest large language model.
"""

def _invoke(
        self,
        model: str,
        credentials: dict,
        prompt_messages: list[PromptMessage],
        model_parameters: dict,
        tools: Optional[list[PromptMessageTool]] = None,
        stop: Optional[list[str]] = None,
        stream: bool = True,
        user: Optional[str] = None,
) -> Union[LLMResult, Generator]:
    """
    Invoke large language model
    :param model: model name
    :param credentials: model credentials
    :param prompt_messages: prompt messages
    :param model_parameters: model parameters
    :param tools: tools for tool calling
    :param stop: stop words
    :param stream: is stream response
    :param user: unique user id
    :return: full response or stream response chunk generator result
    """
    print("----------==========llm==============")
    print('model::', model)
    print('credentials::', credentials)
    print('prompt_messages::', prompt_messages)
    print('model_parameters::', model_parameters)
    print('stream::', stream)
    self._add_custom_parameters(credentials)
    return self._generate(
        model=model,
        credentials=credentials,
        prompt_messages=prompt_messages,
        model_parameters=model_parameters,
        tools=tools,
        stop=stop,
        stream=False,
        user=user,
    )

def get_num_tokens(
        self,
        model: str,
        credentials: dict,
        prompt_messages: list[PromptMessage],
        tools: Optional[list[PromptMessageTool]] = None,
) -> int:
    """
    Get number of tokens for given prompt messages
    :param model: model name
    :param credentials: model credentials
    :param prompt_messages: prompt messages
    :param tools: tools for tool calling
    :return:
    """
    return 0

def validate_credentials(self, model: str, credentials: dict) -> None:
    """
    Validate model credentials
    :param model: model name
    :param credentials: model credentials
    :return:
    """
    try:
        self._add_custom_parameters(credentials)
        # super().validate_credentials(model, credentials)
    except Exception as ex:
        raise CredentialsValidateFailedError(str(ex))

@staticmethod
def _add_custom_parameters(credentials) -> None:
    print('credentials:', credentials)
    credentials["endpoint_url"] = str(URL(credentials.get('base_url', '')))
    credentials["mode"] = LLMMode.CHAT.value
    credentials["function_calling_type"] = "tool_call"
    credentials["stream_function_calling"] = "support"

def _generate(
        self,
        model: str,
        credentials: dict,
        prompt_messages: list[PromptMessage],
        model_parameters: dict,
        tools: Optional[list[PromptMessageTool]] = None,
        stop: Optional[list[str]] = None,
        stream: bool = False,
        user: Optional[str] = None,
) -> Union[LLMResult, Generator]:
    """
    Invoke llm completion model
    :param model: model name
    :param credentials: credentials
    :param prompt_messages: prompt messages
    :param model_parameters: model parameters
    :param stop: stop words
    :param stream: is stream response
    :param user: unique user id
    :return: full response or stream response chunk generator result
    """
    headers = {
        "Content-Type": "application/json",
        "Accept-Charset": "utf-8",
    }
    extra_headers = credentials.get("extra_headers")
    if extra_headers is not None:
        headers = {
            **headers,
            **extra_headers,
        }

    api_key = credentials.get("api_key")
    if api_key:
        headers["Authorization"] = f"Bearer {api_key}"


    print("headers::", headers)

    endpoint_url = credentials["base_url"]
    if not endpoint_url.endswith("/"):
        endpoint_url += "/"

    print('model_parameters::', model_parameters)
    response_format = model_parameters.get("response_format")
    print('response_format::', response_format)
    if response_format:
        if response_format == "json_schema":
            json_schema = model_parameters.get("json_schema")
            if not json_schema:
                raise ValueError("Must define JSON Schema when the response format is json_schema")
            try:
                schema = TypeAdapter(dict[str, Any]).validate_json(json_schema)
            except Exception as exc:
                raise ValueError(f"not correct json_schema format: {json_schema}") from exc
            model_parameters.pop("json_schema")
            model_parameters["response_format"] = {"type": "json_schema", "json_schema": schema}
        else:
            model_parameters["response_format"] = {"type": response_format}
    elif "json_schema" in model_parameters:
        del model_parameters["json_schema"]

    print('stream:::', stream)


    data = {"model": model, "stream": stream, **model_parameters}

    completion_type = LLMMode.value_of(credentials["mode"])

    print("================")
    print("endpoint_url  " + endpoint_url)

    if completion_type is LLMMode.CHAT:
        endpoint_url = urljoin(endpoint_url, "v1/chat/completions")
        data["messages"] = [self._convert_prompt_message_to_dict(m, credentials) for m in prompt_messages]
    elif completion_type is LLMMode.COMPLETION:
        endpoint_url = urljoin(endpoint_url, "completions")
        data["prompt"] = prompt_messages[0].content
    else:
        raise ValueError("Unsupported completion type for model configuration.")

    if stop:
        data["stop"] = stop

    if user:
        data["user"] = user

    print('resport:', endpoint_url)
    print('headers:', headers)
    print('json:', data)

    response = requests.post(endpoint_url, headers=headers, json=data, timeout=(10, 300), stream=stream)

    if response.encoding is None or response.encoding == "ISO-8859-1":
        response.encoding = "utf-8"

    if response.status_code != 200:
        raise InvokeError(f"API request failed with status code {response.status_code}: {response.text}")

    if stream:
        print('我来到了这里stream')
        return self._handle_generate_stream_response(model, credentials, response, prompt_messages)

    return self._handle_generate_response(model, credentials, response, prompt_messages)

def _handle_generate_response(
        self,
        model: str,
        credentials: dict,
        response: requests.Response,
        prompt_messages: list[PromptMessage],
) -> LLMResult:
    response_json: dict = response.json()

    completion_type = LLMMode.value_of(credentials["mode"])
    print('response_json2:', response_json)
    # output = response_json["choices"][0]
    # message_id = response_json.get("id")

    response_content = ""
    # if completion_type is LLMMode.CHAT:
    # message = response_json.get("message", {})
    # response_content = message.get("content", "")
    #获取大模型结果
    choices = response_json.get("choices", [])
    if choices:
        first_choice = choices[0]
        message = first_choice.get("message", {})
        response_content = message.get("content", "")
    else:
        response_content = ""
    # else:
    #     response_content = response_json["response"]

    assistant_message = AssistantPromptMessage(content=response_content, tool_calls=[])
    print('assistant_message:', assistant_message)

    usage = response_json.get("usage")
    if usage:
        # transform usage
        prompt_tokens = usage["prompt_tokens"]
        completion_tokens = usage["completion_tokens"]
    else:
        # calculate num tokens
        assert prompt_messages[0].content is not None
        prompt_tokens = self._num_tokens_from_string(model, prompt_messages[0].content)
        assert assistant_message.content is not None
        completion_tokens = self._num_tokens_from_string(model, assistant_message.content)

    # transform usage
    usage = self._calc_response_usage(model, credentials, prompt_tokens, completion_tokens)

    # transform response
    result = LLMResult(
        model=response_json["model"],
        prompt_messages=prompt_messages,
        message=assistant_message,
        usage=usage,
    )

    return result

def _handle_generate_stream_response(
        self, model: str, credentials: dict, response: requests.Response, prompt_messages: list[PromptMessage]
) -> Generator:
    """
    Handle llm stream response

    :param model: model name
    :param credentials: model credentials
    :param response: streamed response
    :param prompt_messages: prompt messages
    :return: llm response chunk generator
    """
    chunk_index = 0
    full_assistant_content = ""
    tools_calls: list[AssistantPromptMessage.ToolCall] = []
    finish_reason = None
    usage = None
    is_reasoning_started = False
    # delimiter for stream response, need unicode_escape
    delimiter = credentials.get("stream_mode_delimiter", "\n\n")
    delimiter = codecs.decode(delimiter, "unicode_escape")
    for chunk in response.iter_lines(decode_unicode=True, delimiter=delimiter):
        chunk = chunk.strip()
        if chunk:
            # ignore sse comments
            if chunk.startswith(":"):
                continue
            decoded_chunk = chunk.strip().removeprefix("data:").lstrip()
            if decoded_chunk == "[DONE]":  # Some provider returns "data: [DONE]"
                continue

            try:
                chunk_json: dict = TypeAdapter(dict[str, Any]).validate_json(decoded_chunk)
            # stream ended
            except ValidationError:
                yield self._create_final_llm_result_chunk(
                    index=chunk_index + 1,
                    message=AssistantPromptMessage(content=""),
                    finish_reason="Non-JSON encountered.",
                    usage=usage,
                    model=model,
                    credentials=credentials,
                    prompt_messages=prompt_messages,
                    full_content=full_assistant_content,
                )
                break
            # handle the error here. for issue #11629
            if chunk_json.get("error") and chunk_json.get("choices") is None:
                raise ValueError(chunk_json.get("error"))

            if chunk_json:  # noqa: SIM102
                if u := chunk_json.get("usage"):
                    usage = u
            if not chunk_json or len(chunk_json["choices"]) == 0:
                continue

            choice = chunk_json["choices"][0]
            finish_reason = chunk_json["choices"][0].get("finish_reason")
            chunk_index += 1

            if "delta" in choice:
                delta = choice["delta"]
                delta_content, is_reasoning_started = self._wrap_thinking_by_reasoning_content(
                    delta, is_reasoning_started
                )

                assistant_message_tool_calls = None

                if "tool_calls" in delta and credentials.get("function_calling_type", "no_call") == "tool_call":
                    assistant_message_tool_calls = delta.get("tool_calls", None)
                elif (
                        "function_call" in delta
                        and credentials.get("function_calling_type", "no_call") == "function_call"
                ):
                    assistant_message_tool_calls = [
                        {"id": "tool_call_id", "type": "function", "function": delta.get("function_call", {})}
                    ]

                # extract tool calls from response
                if assistant_message_tool_calls:
                    tool_calls = self._extract_response_tool_calls(assistant_message_tool_calls)
                    _increase_tool_call(tool_calls, tools_calls)

                if delta_content is None or delta_content == "":
                    continue

                # transform assistant message to prompt message
                assistant_prompt_message = AssistantPromptMessage(
                    content=delta_content,
                )

                full_assistant_content += delta_content
            elif "text" in choice:
                choice_text = choice.get("text", "")
                if choice_text == "":
                    continue

                # transform assistant message to prompt message
                assistant_prompt_message = AssistantPromptMessage(content=choice_text)
                full_assistant_content += choice_text
            else:
                continue

            yield LLMResultChunk(
                model=model,
                delta=LLMResultChunkDelta(
                    index=chunk_index,
                    message=assistant_prompt_message,
                ),
            )

        chunk_index += 1

    if tools_calls:
        yield LLMResultChunk(
            model=model,
            delta=LLMResultChunkDelta(
                index=chunk_index,
                message=AssistantPromptMessage(tool_calls=tools_calls, content=""),
            ),
        )

    yield self._create_final_llm_result_chunk(
        index=chunk_index,
        message=AssistantPromptMessage(content=""),
        finish_reason=finish_reason,
        usage=usage,
        model=model,
        credentials=credentials,
        prompt_messages=prompt_messages,
        full_content=full_assistant_content,
    )

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @guanhd on GitHub (Jan 26, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. I am customizing a large model plugin. Where can I input the stream parameter? Aside from setting stream via response_mode in the API call, are there any other places where stream can be configured? I tried when calling the workflow API "response_mode": "streaming" and "response_mode": "blocking", the stream obtained in the following methods of the plugin is always True def _invoke( self, model: str, credentials: dict, prompt_messages: list[PromptMessage], model_parameters: dict, tools: Optional[list[PromptMessageTool]] = None, stop: Optional[list[str]] = None, stream: bool = True, user: Optional[str] = None, ) -> Union[LLMResult, Generator]: ### 2. Additional context or comments ----------------the code is ------------------------ import logging import json from collections.abc import Generator from typing import Any, Optional, Union, cast from yarl import URL from urllib.parse import urljoin import requests from pydantic import TypeAdapter, ValidationError from dify_plugin import OAICompatLargeLanguageModel from dify_plugin.entities import I18nObject from dify_plugin.errors.model import ( CredentialsValidateFailedError, ) from dify_plugin.entities.model import ( AIModelEntity, FetchFrom, ModelType, ) from dify_plugin.entities.model.llm import ( LLMResult, LLMMode, LLMResultChunk, LLMResultChunkDelta, ) from dify_plugin.entities.model.message import ( PromptMessage, PromptMessageTool, PromptMessageFunction, AssistantPromptMessage, ) from dify_plugin.errors.model import ( CredentialsValidateFailedError, InvokeAuthorizationError, InvokeBadRequestError, InvokeConnectionError, InvokeError, InvokeRateLimitError, InvokeServerUnavailableError, ) import codecs import time from util.crypt_utils import CryptUtils logger = logging.getLogger(__name__) class ModelLargeLanguageModel(OAICompatLargeLanguageModel): """ Model class for modeltest large language model. """ def _invoke( self, model: str, credentials: dict, prompt_messages: list[PromptMessage], model_parameters: dict, tools: Optional[list[PromptMessageTool]] = None, stop: Optional[list[str]] = None, stream: bool = True, user: Optional[str] = None, ) -> Union[LLMResult, Generator]: """ Invoke large language model :param model: model name :param credentials: model credentials :param prompt_messages: prompt messages :param model_parameters: model parameters :param tools: tools for tool calling :param stop: stop words :param stream: is stream response :param user: unique user id :return: full response or stream response chunk generator result """ print("----------==========llm==============") print('model::', model) print('credentials::', credentials) print('prompt_messages::', prompt_messages) print('model_parameters::', model_parameters) print('stream::', stream) self._add_custom_parameters(credentials) return self._generate( model=model, credentials=credentials, prompt_messages=prompt_messages, model_parameters=model_parameters, tools=tools, stop=stop, stream=False, user=user, ) def get_num_tokens( self, model: str, credentials: dict, prompt_messages: list[PromptMessage], tools: Optional[list[PromptMessageTool]] = None, ) -> int: """ Get number of tokens for given prompt messages :param model: model name :param credentials: model credentials :param prompt_messages: prompt messages :param tools: tools for tool calling :return: """ return 0 def validate_credentials(self, model: str, credentials: dict) -> None: """ Validate model credentials :param model: model name :param credentials: model credentials :return: """ try: self._add_custom_parameters(credentials) # super().validate_credentials(model, credentials) except Exception as ex: raise CredentialsValidateFailedError(str(ex)) @staticmethod def _add_custom_parameters(credentials) -> None: print('credentials:', credentials) credentials["endpoint_url"] = str(URL(credentials.get('base_url', ''))) credentials["mode"] = LLMMode.CHAT.value credentials["function_calling_type"] = "tool_call" credentials["stream_function_calling"] = "support" def _generate( self, model: str, credentials: dict, prompt_messages: list[PromptMessage], model_parameters: dict, tools: Optional[list[PromptMessageTool]] = None, stop: Optional[list[str]] = None, stream: bool = False, user: Optional[str] = None, ) -> Union[LLMResult, Generator]: """ Invoke llm completion model :param model: model name :param credentials: credentials :param prompt_messages: prompt messages :param model_parameters: model parameters :param stop: stop words :param stream: is stream response :param user: unique user id :return: full response or stream response chunk generator result """ headers = { "Content-Type": "application/json", "Accept-Charset": "utf-8", } extra_headers = credentials.get("extra_headers") if extra_headers is not None: headers = { **headers, **extra_headers, } api_key = credentials.get("api_key") if api_key: headers["Authorization"] = f"Bearer {api_key}" print("headers::", headers) endpoint_url = credentials["base_url"] if not endpoint_url.endswith("/"): endpoint_url += "/" print('model_parameters::', model_parameters) response_format = model_parameters.get("response_format") print('response_format::', response_format) if response_format: if response_format == "json_schema": json_schema = model_parameters.get("json_schema") if not json_schema: raise ValueError("Must define JSON Schema when the response format is json_schema") try: schema = TypeAdapter(dict[str, Any]).validate_json(json_schema) except Exception as exc: raise ValueError(f"not correct json_schema format: {json_schema}") from exc model_parameters.pop("json_schema") model_parameters["response_format"] = {"type": "json_schema", "json_schema": schema} else: model_parameters["response_format"] = {"type": response_format} elif "json_schema" in model_parameters: del model_parameters["json_schema"] print('stream:::', stream) data = {"model": model, "stream": stream, **model_parameters} completion_type = LLMMode.value_of(credentials["mode"]) print("================") print("endpoint_url " + endpoint_url) if completion_type is LLMMode.CHAT: endpoint_url = urljoin(endpoint_url, "v1/chat/completions") data["messages"] = [self._convert_prompt_message_to_dict(m, credentials) for m in prompt_messages] elif completion_type is LLMMode.COMPLETION: endpoint_url = urljoin(endpoint_url, "completions") data["prompt"] = prompt_messages[0].content else: raise ValueError("Unsupported completion type for model configuration.") if stop: data["stop"] = stop if user: data["user"] = user print('resport:', endpoint_url) print('headers:', headers) print('json:', data) response = requests.post(endpoint_url, headers=headers, json=data, timeout=(10, 300), stream=stream) if response.encoding is None or response.encoding == "ISO-8859-1": response.encoding = "utf-8" if response.status_code != 200: raise InvokeError(f"API request failed with status code {response.status_code}: {response.text}") if stream: print('我来到了这里stream') return self._handle_generate_stream_response(model, credentials, response, prompt_messages) return self._handle_generate_response(model, credentials, response, prompt_messages) def _handle_generate_response( self, model: str, credentials: dict, response: requests.Response, prompt_messages: list[PromptMessage], ) -> LLMResult: response_json: dict = response.json() completion_type = LLMMode.value_of(credentials["mode"]) print('response_json2:', response_json) # output = response_json["choices"][0] # message_id = response_json.get("id") response_content = "" # if completion_type is LLMMode.CHAT: # message = response_json.get("message", {}) # response_content = message.get("content", "") #获取大模型结果 choices = response_json.get("choices", []) if choices: first_choice = choices[0] message = first_choice.get("message", {}) response_content = message.get("content", "") else: response_content = "" # else: # response_content = response_json["response"] assistant_message = AssistantPromptMessage(content=response_content, tool_calls=[]) print('assistant_message:', assistant_message) usage = response_json.get("usage") if usage: # transform usage prompt_tokens = usage["prompt_tokens"] completion_tokens = usage["completion_tokens"] else: # calculate num tokens assert prompt_messages[0].content is not None prompt_tokens = self._num_tokens_from_string(model, prompt_messages[0].content) assert assistant_message.content is not None completion_tokens = self._num_tokens_from_string(model, assistant_message.content) # transform usage usage = self._calc_response_usage(model, credentials, prompt_tokens, completion_tokens) # transform response result = LLMResult( model=response_json["model"], prompt_messages=prompt_messages, message=assistant_message, usage=usage, ) return result def _handle_generate_stream_response( self, model: str, credentials: dict, response: requests.Response, prompt_messages: list[PromptMessage] ) -> Generator: """ Handle llm stream response :param model: model name :param credentials: model credentials :param response: streamed response :param prompt_messages: prompt messages :return: llm response chunk generator """ chunk_index = 0 full_assistant_content = "" tools_calls: list[AssistantPromptMessage.ToolCall] = [] finish_reason = None usage = None is_reasoning_started = False # delimiter for stream response, need unicode_escape delimiter = credentials.get("stream_mode_delimiter", "\n\n") delimiter = codecs.decode(delimiter, "unicode_escape") for chunk in response.iter_lines(decode_unicode=True, delimiter=delimiter): chunk = chunk.strip() if chunk: # ignore sse comments if chunk.startswith(":"): continue decoded_chunk = chunk.strip().removeprefix("data:").lstrip() if decoded_chunk == "[DONE]": # Some provider returns "data: [DONE]" continue try: chunk_json: dict = TypeAdapter(dict[str, Any]).validate_json(decoded_chunk) # stream ended except ValidationError: yield self._create_final_llm_result_chunk( index=chunk_index + 1, message=AssistantPromptMessage(content=""), finish_reason="Non-JSON encountered.", usage=usage, model=model, credentials=credentials, prompt_messages=prompt_messages, full_content=full_assistant_content, ) break # handle the error here. for issue #11629 if chunk_json.get("error") and chunk_json.get("choices") is None: raise ValueError(chunk_json.get("error")) if chunk_json: # noqa: SIM102 if u := chunk_json.get("usage"): usage = u if not chunk_json or len(chunk_json["choices"]) == 0: continue choice = chunk_json["choices"][0] finish_reason = chunk_json["choices"][0].get("finish_reason") chunk_index += 1 if "delta" in choice: delta = choice["delta"] delta_content, is_reasoning_started = self._wrap_thinking_by_reasoning_content( delta, is_reasoning_started ) assistant_message_tool_calls = None if "tool_calls" in delta and credentials.get("function_calling_type", "no_call") == "tool_call": assistant_message_tool_calls = delta.get("tool_calls", None) elif ( "function_call" in delta and credentials.get("function_calling_type", "no_call") == "function_call" ): assistant_message_tool_calls = [ {"id": "tool_call_id", "type": "function", "function": delta.get("function_call", {})} ] # extract tool calls from response if assistant_message_tool_calls: tool_calls = self._extract_response_tool_calls(assistant_message_tool_calls) _increase_tool_call(tool_calls, tools_calls) if delta_content is None or delta_content == "": continue # transform assistant message to prompt message assistant_prompt_message = AssistantPromptMessage( content=delta_content, ) full_assistant_content += delta_content elif "text" in choice: choice_text = choice.get("text", "") if choice_text == "": continue # transform assistant message to prompt message assistant_prompt_message = AssistantPromptMessage(content=choice_text) full_assistant_content += choice_text else: continue yield LLMResultChunk( model=model, delta=LLMResultChunkDelta( index=chunk_index, message=assistant_prompt_message, ), ) chunk_index += 1 if tools_calls: yield LLMResultChunk( model=model, delta=LLMResultChunkDelta( index=chunk_index, message=AssistantPromptMessage(tool_calls=tools_calls, content=""), ), ) yield self._create_final_llm_result_chunk( index=chunk_index, message=AssistantPromptMessage(content=""), finish_reason=finish_reason, usage=usage, model=model, credentials=credentials, prompt_messages=prompt_messages, full_content=full_assistant_content, ) ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 🙋‍♂️ question label 2026-02-21 20:14:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21906