Coverage for src/fastoai/models/__init__.py: 100%

1 from pathlib import Path

2

3 from ..settings import get_settings

4 from ._codegen import generate_modules, ruff_check

5 from ._metadata import WithMetadata as WithMetadata

6 from .user import APIKey, User

7

8 if get_settings().generate_models:

9 import openai.types.beta.assistant

10 import openai.types.beta.thread

11 import openai.types.beta.threads.message

12 import openai.types.beta.threads.run

13 import openai.types.beta.threads.runs.run_step

14 import openai.types.file_object

15

16 generate_modules(

17 openai.types.beta.assistant,

18 openai.types.beta.thread,

19 openai.types.beta.threads.message,

20 openai.types.beta.threads.run,

21 openai.types.beta.threads.runs.run_step,

22 openai.types.file_object,

23 )

24 ruff_check(Path(__file__).parent / "generated")

25

26 from .generated.assistant import Assistant

27 from .generated.file_object import FileObject

28 from .generated.message import Message

29 from .generated.run import Run

30 from .generated.run_step import RunStep

31 from .generated.thread import Thread

32

33 __all__ = [

34 "APIKey",

35 "User",

36 "Assistant",

37 "Message",

38 "Run",

39 "RunStep",

40 "Thread",

41 "FileObject",

42]