xvadur commited on
Commit
8f31e6a
·
verified ·
1 Parent(s): 6521f18

Update copilot_promptor.py

Browse files
Files changed (1) hide show
  1. copilot_promptor.py +29 -8
copilot_promptor.py CHANGED
@@ -1,10 +1,31 @@
1
- import os
 
 
 
2
 
3
- def generate_prompt(data: dict):
4
- os.makedirs("publish", exist_ok=True)
5
 
6
- with open("publish/copilot_prompt.txt", "w") as f:
7
- f.write(
8
- f"# Copilot Prompt\n\nCreate code that implements: {data['intent']} "
9
- f"focusing on {data['focus']}.\n\nEnsure compliance with Aethero Syntax Language."
10
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ def generate_prompt(data: dict) -> str:
2
+ """
3
+ Generuje štruktúrovaný prompt pre vývojové prostredie na základe analýzy vstupných dát.
4
+ Používa sa vo VSCode, GitHub Copilot alebo LangChain pre orchestráciu kódu.
5
 
6
+ Args:
7
+ data (dict): Dictionary obsahujúce analýzu vstupu (intent, focus, directives)
8
 
9
+ Returns:
10
+ str: Formátovaný prompt pre vývojové prostredie
11
+ """
12
+ intent = data.get('intent', 'Implementácia nového modulu')
13
+ focus = data.get('focus', 'Kód v Pythone')
14
+ directives = data.get('directives', ['Vytvor funkciu', 'Pridaj komentáre'])
15
+
16
+ prompt = f"""
17
+ # Aethero Orchestra Prompt
18
+ # Intent: {intent}
19
+ # Focus: {focus}
20
+ # Direktívy: {', '.join(directives)}
21
+
22
+ # Generuj kód podľa nasledujúcich pokynov:
23
+ - Použi čistý a modulárny štýl Pythonu.
24
+ - Pridaj dokumentačné reťazce (docstrings) pre každú funkciu.
25
+ - Zachovaj kompatibilitu s Aethero Syntax Language (ASL).
26
+ - Výstup má byť pripravený na integráciu do `Aethero_github`.
27
+
28
+ # Začni s kódom:
29
+ """
30
+
31
+ return prompt