acecalisto3 commited on
Commit
20bda09
1 Parent(s): 76f0320

Update cust_types.py

Browse files
Files changed (1) hide show
  1. cust_types.py +50 -12
cust_types.py CHANGED
@@ -1,16 +1,54 @@
1
  from typing import List, Optional
2
- from agent import (
3
- Code,
4
- Prompt,
5
- AppType,
6
- File,
7
- Space,
8
- Tutorial,
9
- WebApp,
10
- GradioApp,
11
- StreamlitApp,
12
- ReactApp,
13
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  def createLlamaPrompt(
16
  app_type: AppType,
 
1
  from typing import List, Optional
2
+
3
+ # Type definitions (moved from agent/__init__.py)
4
+ class Code:
5
+ def __init__(self, code: str, language: str):
6
+ self.code = code
7
+ self.language = language
8
+
9
+ class Prompt:
10
+ def __init__(self, prompt: str):
11
+ self.prompt = prompt
12
+
13
+ class AppType:
14
+ WEB_APP = "WebApp"
15
+ GRADIO_APP = "GradioApp"
16
+ STREAMLIT_APP = "StreamlitApp"
17
+ REACT_APP = "ReactApp"
18
+
19
+ class File:
20
+ def __init__(self, name: str, content: str, language: str):
21
+ self.name = name
22
+ self.content = content
23
+ self.language = language
24
+
25
+ class Space:
26
+ def __init__(self, space: str):
27
+ self.space = space
28
+
29
+ class Tutorial:
30
+ def __init__(self, tutorial: str):
31
+ self.tutorial = tutorial
32
+
33
+ class WebApp:
34
+ def __init__(self, code: str, language: str):
35
+ self.code = code
36
+ self.language = language
37
+
38
+ class GradioApp:
39
+ def __init__(self, code: str, language: str):
40
+ self.code = code
41
+ self.language = language
42
+
43
+ class StreamlitApp:
44
+ def __init__(self, code: str, language: str):
45
+ self.code = code
46
+ self.language = language
47
+
48
+ class ReactApp:
49
+ def __init__(self, code: str, language: str):
50
+ self.code = code
51
+ self.language = language
52
 
53
  def createLlamaPrompt(
54
  app_type: AppType,