awacke1 commited on
Commit
aef72ef
β€’
1 Parent(s): e3826f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -15,8 +15,8 @@ load_dotenv()
15
  openai.api_key = os.getenv('OPENAI_KEY')
16
 
17
  def chat_with_model(prompts):
18
- #model = "gpt-3.5-turbo"
19
- model = "gpt-4-32k"
20
  conversation = [{'role': 'system', 'content': 'You are a helpful assistant.'}]
21
  conversation.extend([{'role': 'user', 'content': prompt} for prompt in prompts])
22
 
@@ -44,7 +44,9 @@ def CompressXML(xml_text):
44
  for elem in list(root.iter()):
45
  if isinstance(elem.tag, str) and 'Comment' in elem.tag:
46
  elem.parent.remove(elem)
47
- return ET.tostring(root, encoding='unicode', method="xml")
 
 
48
 
49
  def read_file_content(file):
50
  if file.type == "application/json":
 
15
  openai.api_key = os.getenv('OPENAI_KEY')
16
 
17
  def chat_with_model(prompts):
18
+ model = "gpt-3.5-turbo"
19
+ #model = "gpt-4-32k"
20
  conversation = [{'role': 'system', 'content': 'You are a helpful assistant.'}]
21
  conversation.extend([{'role': 'user', 'content': prompt} for prompt in prompts])
22
 
 
44
  for elem in list(root.iter()):
45
  if isinstance(elem.tag, str) and 'Comment' in elem.tag:
46
  elem.parent.remove(elem)
47
+ #return ET.tostring(root, encoding='unicode', method="xml")
48
+ return ET.tostring(root, encoding='unicode', method="xml")[:8000]
49
+
50
 
51
  def read_file_content(file):
52
  if file.type == "application/json":