fix: finish conversion to StrEnum

We still had a few enum declared to behave like string as well as enum.
Let's use StrEnum for those.

Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
Sébastien Han 2025-06-25 12:59:16 +02:00
parent cfee63bd0d
commit 299873ee2f
No known key found for this signature in database
8 changed files with 17 additions and 17 deletions

View file

@ -4,7 +4,7 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from enum import Enum
from enum import StrEnum
from typing import Annotated, Literal, Protocol, runtime_checkable
from fastapi import File, Form, Response, UploadFile
@ -16,7 +16,7 @@ from llama_stack.schema_utils import json_schema_type, webmethod
# OpenAI Files API Models
class OpenAIFilePurpose(str, Enum):
class OpenAIFilePurpose(StrEnum):
"""
Valid purpose values for OpenAI Files API.
"""