mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: Replace StrEnum with strenum in code_exec.py (#9376)
### What problem does this PR solve? - The enum import was changed from Python's built-in StrEnum to the strenum package. - Fix error `Warning: Failed to import module code_exec: cannot import name 'StrEnum' from 'enum' (/usr/lib/python3.10/enum.py)` ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -17,7 +17,7 @@ import base64
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from abc import ABC
|
from abc import ABC
|
||||||
from enum import StrEnum
|
from strenum import StrEnum
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from pydantic import BaseModel, Field, field_validator
|
from pydantic import BaseModel, Field, field_validator
|
||||||
from agent.tools.base import ToolParamBase, ToolBase, ToolMeta
|
from agent.tools.base import ToolParamBase, ToolBase, ToolMeta
|
||||||
|
|||||||
Reference in New Issue
Block a user