File_structure refactor
This commit is contained in:
parent
a64a07511d
commit
75af912bf5
@ -1,9 +0,0 @@
|
|||||||
from ..openai_client.models import Message, Prompt
|
|
||||||
|
|
||||||
|
|
||||||
class LLMInterface:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
pass
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
from dataclasses import dataclass, field, asdict, fields
|
from dataclasses import dataclass, field, asdict
|
||||||
from abc import ABC
|
from abc import ABC
|
||||||
|
|
||||||
|
|
||||||
@ -71,14 +71,6 @@ class Response:
|
|||||||
output: list[Message]
|
output: list[Message]
|
||||||
|
|
||||||
|
|
||||||
def filter_fields(data: dict, dataclass_type: dataclass) -> dict:
|
|
||||||
return {
|
|
||||||
i_key: i_value
|
|
||||||
for i_key, i_value in data.items()
|
|
||||||
if i_key in tuple(i_field.name for i_field in fields(dataclass_type))
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from openai import OpenAI
|
from openai import OpenAI
|
||||||
client = OpenAI()
|
client = OpenAI()
|
||||||
Loading…
x
Reference in New Issue
Block a user