Dr VegaPunk
Browse files- .gitignore +1 -0
- config/__init__.py +0 -0
- config/settings.py +0 -0
- interface/__init__.py +0 -0
- interface/app.py +0 -0
- punkrecord/__init__.py +0 -0
- punkrecord/api.py +0 -0
- punkrecord/database.py +0 -0
- punkrecord/models.py +9 -0
- req.txt +3 -0
- satellites/__init__.py +0 -0
- satellites/atlas/__init__.py +0 -0
- satellites/atlas/agent.py +3 -0
- satellites/base_satellite.py +104 -0
- satellites/edison/__init__.py +0 -0
- satellites/edison/agent.py +0 -0
- satellites/lilith/__init__.py +0 -0
- satellites/lilith/agent.py +0 -0
- satellites/pythagoras/__init__.py +0 -0
- satellites/pythagoras/agent.py +0 -0
- satellites/shaka/__init__.py +0 -0
- satellites/shaka/agent.py +0 -0
- satellites/york/__init__.py +0 -0
- satellites/york/agent.py +0 -0
- setup.py +0 -0
- stellar/__init__.py +0 -0
- stellar/decision_engine.py +0 -0
- stellar/vegapunk.py +0 -0
- subagents/__init__.py +0 -0
- subagents/base_subagent.py +0 -0
- utils/__init__.py +0 -0
- utils/helpers.py +0 -0
- utils/logger.py +0 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
.env
|
config/__init__.py
ADDED
File without changes
|
config/settings.py
ADDED
File without changes
|
interface/__init__.py
ADDED
File without changes
|
interface/app.py
ADDED
File without changes
|
punkrecord/__init__.py
ADDED
File without changes
|
punkrecord/api.py
ADDED
File without changes
|
punkrecord/database.py
ADDED
File without changes
|
punkrecord/models.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
for i in range(0, 100):
|
7 |
+
print(i)
|
8 |
+
if i == 10:
|
9 |
+
break
|
req.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
langchain>=0.0.100
|
2 |
+
openai>=0.27.0
|
3 |
+
python-dotenv>=0.19.0
|
satellites/__init__.py
ADDED
File without changes
|
satellites/atlas/__init__.py
ADDED
File without changes
|
satellites/atlas/agent.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from satellites.base_satellite import BaseSatellite
|
2 |
+
|
3 |
+
class Atlas
|
satellites/base_satellite.py
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from langchain import OpenAI, LLMChain
|
2 |
+
from langchain.prompts import PromptTemplate
|
3 |
+
from langchain.memory import ConversationBufferMemory
|
4 |
+
|
5 |
+
from abc import ABC, abstractmethod
|
6 |
+
from typing import List,Dict,Any
|
7 |
+
|
8 |
+
|
9 |
+
class BaseSatellite(ABC):
|
10 |
+
def __init__(self,name:str,specialty:str):
|
11 |
+
self.name = name
|
12 |
+
self.specialty = specialty
|
13 |
+
self.knowledge_base = {}
|
14 |
+
self.task_queue = []
|
15 |
+
|
16 |
+
|
17 |
+
@abstractmethod
|
18 |
+
def process_task(self,task:Dict[str,Any]) -> Dict[str,Any]:
|
19 |
+
"""
|
20 |
+
Traite une tache specifique au satellite
|
21 |
+
a implementer dans chaque classe de satellite specifique
|
22 |
+
"""
|
23 |
+
pass
|
24 |
+
def add_to_knowledge_base(self,key:str,value:Any):
|
25 |
+
# Ajoute une information a la base de connaissance du satellite
|
26 |
+
self.knowledge_base[key] = value
|
27 |
+
def get_from_knowledge_base(self,key:str) -> Any:
|
28 |
+
# Recupere une information de la base de connaissance du satellite
|
29 |
+
return self.knowledge_base.get(key)
|
30 |
+
|
31 |
+
def add_task(self,task:Dict[str,Any]):
|
32 |
+
# Ajoute une tache a la file d'attente du satellite
|
33 |
+
self.task_queue.append(task)
|
34 |
+
|
35 |
+
def get_next_task(self) -> Dict[str,Any]:
|
36 |
+
# Recupere la prochaine tache a traiter
|
37 |
+
if self.task_queue:
|
38 |
+
return self.task_queue.pop(0)
|
39 |
+
return None
|
40 |
+
|
41 |
+
def report_status(self):
|
42 |
+
# Rapporte le status du satellite
|
43 |
+
return {
|
44 |
+
"name":self.name,
|
45 |
+
"specialty":self.specialty,
|
46 |
+
"knowledge_base":self.knowledge_base,
|
47 |
+
"task_queue":self.task_queue,
|
48 |
+
"task_pending":len(self.task_queue),
|
49 |
+
"Knowledge_base_size": len(self.knowledge_base),
|
50 |
+
}
|
51 |
+
|
52 |
+
@abstractmethod
|
53 |
+
def communicate_with_stellar(self,message:Dict[str,Any]) -> Dict[str,Any]:
|
54 |
+
"""
|
55 |
+
Méthode pour communiquer avec le satellite manager (Stellar).
|
56 |
+
À implémenter dans chaque classe de satellite spécifique.
|
57 |
+
"""
|
58 |
+
pass
|
59 |
+
|
60 |
+
def update_from_punkrocord(self) -> None:
|
61 |
+
# Methode pour mettre a jour de la base de connaissance local du satellite depuis punkrecord
|
62 |
+
pass
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
|
76 |
+
#
|
77 |
+
#
|
78 |
+
# class Satellite:
|
79 |
+
# def __init__(self, name, specialty):
|
80 |
+
# self.name = name
|
81 |
+
# self.specialty = specialty
|
82 |
+
# self.llm = OpenAI(temperature=0.7)
|
83 |
+
# self.memory = ConversationBufferMemory(memory_key="chat_history")
|
84 |
+
# self.prompt = PromptTemplate(
|
85 |
+
# input_variables=["chat_history", "human_input", "specialty"],
|
86 |
+
# template="""You are {specialty}.
|
87 |
+
# Chat History: {chat_history}
|
88 |
+
# Human: {human_input}
|
89 |
+
# AI Assistant:"""
|
90 |
+
# )
|
91 |
+
# self.chain = LLMChain(
|
92 |
+
# llm=self.llm,
|
93 |
+
# prompt=self.prompt,
|
94 |
+
# memory=self.memory,
|
95 |
+
# )
|
96 |
+
#
|
97 |
+
# def process(self, input_text):
|
98 |
+
# return self.chain.run(human_input=input_text, specialty=self.specialty)
|
99 |
+
#
|
100 |
+
#
|
101 |
+
# # Exemple d'utilisation
|
102 |
+
# shaka = Satellite("Shaka", "an AI specializing in wisdom and general knowledge")
|
103 |
+
# response = shaka.process("Tell me about the importance of knowledge.")
|
104 |
+
# print(response)
|
satellites/edison/__init__.py
ADDED
File without changes
|
satellites/edison/agent.py
ADDED
File without changes
|
satellites/lilith/__init__.py
ADDED
File without changes
|
satellites/lilith/agent.py
ADDED
File without changes
|
satellites/pythagoras/__init__.py
ADDED
File without changes
|
satellites/pythagoras/agent.py
ADDED
File without changes
|
satellites/shaka/__init__.py
ADDED
File without changes
|
satellites/shaka/agent.py
ADDED
File without changes
|
satellites/york/__init__.py
ADDED
File without changes
|
satellites/york/agent.py
ADDED
File without changes
|
setup.py
ADDED
File without changes
|
stellar/__init__.py
ADDED
File without changes
|
stellar/decision_engine.py
ADDED
File without changes
|
stellar/vegapunk.py
ADDED
File without changes
|
subagents/__init__.py
ADDED
File without changes
|
subagents/base_subagent.py
ADDED
File without changes
|
utils/__init__.py
ADDED
File without changes
|
utils/helpers.py
ADDED
File without changes
|
utils/logger.py
ADDED
File without changes
|