Abhaykoul commited on
Commit
a21146e
1 Parent(s): 2e7808c

Update AI.py

Browse files
Files changed (1) hide show
  1. AI.py +0 -16
AI.py CHANGED
@@ -4,7 +4,6 @@ from uuid import uuid4
4
  import io
5
  import re
6
  import json
7
- from webscout.AIutel import Optimizers
8
  from webscout.AIutel import Conversation
9
  from typing import Any
10
  import logging
@@ -60,11 +59,6 @@ class OPENGPT:
60
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
61
  }
62
 
63
- self.__available_optimizers = (
64
- method
65
- for method in dir(Optimizers)
66
- if callable(getattr(Optimizers, method)) and not method.startswith("__")
67
- )
68
  self.session.headers.update(self.headers)
69
  Conversation.intro = (
70
  AwesomePrompts().get_act(
@@ -123,16 +117,6 @@ class OPENGPT:
123
  }
124
  ```
125
  """
126
- conversation_prompt = self.conversation.gen_complete_prompt(prompt)
127
- if optimizer:
128
- if optimizer in self.__available_optimizers:
129
- conversation_prompt = getattr(Optimizers, optimizer)(
130
- conversation_prompt if conversationally else prompt
131
- )
132
- else:
133
- raise Exception(
134
- f"Optimizer is not one of {self.__available_optimizers}"
135
- )
136
 
137
  self.session.headers.update(self.headers)
138
  self.session.headers.update(
 
4
  import io
5
  import re
6
  import json
 
7
  from webscout.AIutel import Conversation
8
  from typing import Any
9
  import logging
 
59
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
60
  }
61
 
 
 
 
 
 
62
  self.session.headers.update(self.headers)
63
  Conversation.intro = (
64
  AwesomePrompts().get_act(
 
117
  }
118
  ```
119
  """
 
 
 
 
 
 
 
 
 
 
120
 
121
  self.session.headers.update(self.headers)
122
  self.session.headers.update(