Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AvenCores committed Apr 25, 2023
1 parent ffb25ae commit 56b7666
Show file tree
Hide file tree
Showing 48 changed files with 2,215 additions and 191 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/ora/__pycache__
/quora/__pycache__
2 changes: 1 addition & 1 deletion BUILD/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
system("rd /s /q build")
system("rd /s /q dist")
system("del /q *.spec")
system(f'pyinstaller --noconfirm --onefile --icon "cli.ico" --add-data "../ora;." "../main.py"')
system(f'pyinstaller --noconfirm --onefile --icon "cli.ico" --add-data "../quora;." "../main.py"')
system("del /q *.spec")
system("rd /s /q build")
system("rd /s /q %USERPROFILE%\AppData\Local\pyinstaller")
Expand Down
Binary file removed main.exe
Binary file not shown.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from termcolor import colored
from sys import platform
from os import system
import ora
import quora

def clear():
if platform == "linux" or platform == "linux2" or platform == "unix":
Expand Down Expand Up @@ -29,9 +29,9 @@ def clear():
while True:
youinput = input(colored("\n👨 You ", "yellow") + colored(">> ", "green"))
try:
model = ora.CompletionModel.create('gpt-4')
prompt = youinput
response = ora.Completion.create(model = model, prompt = prompt, includeHistory = True)
response = quora.Completion.create(model = 'sage',
prompt = youinput,
token = 'AuYSfjZVc5eyAzrWjKmjFg%3D%3D')
output = response.completion.choices[0].text
print(colored("\n🤖 CHATGPT V4.0 ", "cyan") + colored(">> ", "green") + output)
except Exception as e:
Expand Down
41 changes: 0 additions & 41 deletions ora/README.md

This file was deleted.

49 changes: 0 additions & 49 deletions ora/__init__.py

This file was deleted.

55 changes: 0 additions & 55 deletions ora/model.py

This file was deleted.

39 changes: 0 additions & 39 deletions ora/typing.py

This file was deleted.

68 changes: 68 additions & 0 deletions quora/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#### warning !!!
poe.com added security and can detect if you are making automated requests. You may get your account banned if you are using this api.
The normal non-driver api is also currently not very stable


### Example: `quora (poe)` (use like openai pypi package) - GPT-4 <a name="example-poe"></a>

```python
# quora model names: (use left key as argument)
models = {
'sage' : 'capybara',
'gpt-4' : 'beaver',
'claude-v1.2' : 'a2_2',
'claude-instant-v1.0' : 'a2',
'gpt-3.5-turbo' : 'chinchilla'
}
```

#### !! new: bot creation

```python
# import quora (poe) package
import quora

# create account
# make sure to set enable_bot_creation to True
token = quora.Account.create(logging = True, enable_bot_creation=True)

model = quora.Model.create(
token = token,
model = 'gpt-3.5-turbo', # or claude-instant-v1.0
system_prompt = 'you are ChatGPT a large language model ...'
)

print(model.name) # gptx....

# streaming response
for response in quora.StreamingCompletion.create(
custom_model = model.name,
prompt ='hello world',
token = token):

print(response.completion.choices[0].text)
```

#### Normal Response:
```python

response = quora.Completion.create(model = 'gpt-4',
prompt = 'hello world',
token = token)

print(response.completion.choices[0].text)
```

#### Update Use This For Poe
```python
from quora import Poe

# available models: ['Sage', 'GPT-4', 'Claude+', 'Claude-instant', 'ChatGPT', 'Dragonfly', 'NeevaAI']

poe = Poe(model='ChatGPT')
poe.chat('who won the football world cup most?')

# new bot creation
poe.create_bot('new_bot_name', prompt='You are new test bot', base_model='gpt-3.5-turbo')

```
Loading

0 comments on commit 56b7666

Please sign in to comment.