Skip to content

Commit

Permalink
hello
Browse files Browse the repository at this point in the history
  • Loading branch information
lokendar jangid committed Feb 24, 2023
1 parent ff25051 commit f407e44
Show file tree
Hide file tree
Showing 21 changed files with 661 additions and 176 deletions.
Empty file added .idea/.gitignore
Empty file.
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/loky.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

164 changes: 0 additions & 164 deletions Edith.py

This file was deleted.

Binary file added __pycache__/chatgpt.cpython-310.pyc
Binary file not shown.
Binary file added __pycache__/main.cpython-310.pyc
Binary file not shown.
Binary file added __pycache__/voice_work.cpython-310.pyc
Binary file not shown.
32 changes: 32 additions & 0 deletions chatgpt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import openai

class Chatgpt:
def __init__(self) -> None:
openai.api_key = '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'

def write_code(self, prompt_text):
response = openai.Completion.create(
model="code-davinci-002",
prompt=prompt_text,
temperature=0,
max_tokens=256,
)

return response

def text_out(self, prompt_text: str):
response = openai.Completion.create(
model="text-davinci-003",
prompt=prompt_text,
max_tokens=400,
temperature=0.9,
)
return response

def generate_image(self, prompt_text):
response = openai.Image.create(
prompt=prompt_text,
n=1,
size="1024x1024"
)
return response
Binary file added images/ a dog.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f407e44

Please sign in to comment.