Skip to content

Commit

Permalink
fix: Azure AI Foundry model cannot be used in the workflow (#13323)
Browse files Browse the repository at this point in the history
Signed-off-by: -LAN- <laipz8200@outlook.com>
  • Loading branch information
laipz8200 authored Feb 7, 2025
1 parent 3f42fab commit f951590
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/core/model_runtime/entities/llm_entities.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from decimal import Decimal
from enum import Enum
from enum import StrEnum
from typing import Optional

from pydantic import BaseModel
Expand All @@ -8,7 +8,7 @@
from core.model_runtime.entities.model_entities import ModelUsage, PriceInfo


class LLMMode(Enum):
class LLMMode(StrEnum):
"""
Enum class for large language model mode.
"""
Expand Down
3 changes: 2 additions & 1 deletion api/core/workflow/nodes/llm/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pydantic import BaseModel, Field, field_validator

from core.model_runtime.entities import ImagePromptMessageContent
from core.model_runtime.entities.llm_entities import LLMMode
from core.prompt.entities.advanced_prompt_entities import ChatModelMessage, CompletionModelPromptTemplate, MemoryConfig
from core.workflow.entities.variable_entities import VariableSelector
from core.workflow.nodes.base import BaseNodeData
Expand All @@ -12,7 +13,7 @@
class ModelConfig(BaseModel):
provider: str
name: str
mode: str
mode: LLMMode = LLMMode.COMPLETION
completion_params: dict[str, Any] = {}


Expand Down

0 comments on commit f951590

Please sign in to comment.