Compare commits
No commits in common. "180c167a436ffa79a683627ce6ff42dcfd1a6b7b" and "a64a07511d415348ecc581043ae75d7c41e14103" have entirely different histories.
180c167a43
...
a64a07511d
9
reginaldCog/discord_bot/llm_interface.py
Normal file
9
reginaldCog/discord_bot/llm_interface.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
from ..openai_client.models import Message, Prompt
|
||||||
|
|
||||||
|
|
||||||
|
class LLMInterface:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
pass
|
||||||
@ -1,7 +0,0 @@
|
|||||||
from abc import ABC, abstractmethod
|
|
||||||
|
|
||||||
|
|
||||||
class MessageFactory(ABC):
|
|
||||||
@abstractmethod
|
|
||||||
def new(self, raw_message: dict) -> object:
|
|
||||||
pass
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
from dataclasses import dataclass, field, asdict
|
from dataclasses import dataclass, field, asdict, fields
|
||||||
from abc import ABC
|
from abc import ABC
|
||||||
|
|
||||||
|
|
||||||
@ -71,6 +71,14 @@ 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()
|
||||||
0
reginaldCog/utils/__init__.py
Normal file
0
reginaldCog/utils/__init__.py
Normal file
Loading…
x
Reference in New Issue
Block a user