Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored Aug 17, 2024
1 parent 12fe09f commit bb138b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def mini(ctx, prompt: discord.Option(str, description="Der Prompt"), url:
page = await browser.new_page()
await page.goto(url)
await page.emulate_media(media="screen")
pdf = await page.pdf(width="2160px", height="3840px", landscape=True)
pdf = await page.pdf(width="1440px", height="2560px", landscape=True)
await browser.close()
file = oaiclient.files.create(file=("website.pdf", pdf), purpose="assistants")
assistant = oaiclient.beta.assistants.create(model="gpt-4o-mini", tools=[{"type": "file_search"}], instructions="Du befolgst die dir gegebenen Anweisungen und beachtest dabei die Webseite, welche du als PDF-Datei im Anhang findest.")
Expand Down Expand Up @@ -131,7 +131,7 @@ async def gpt(ctx, prompt: discord.Option(str, description="Der Prompt"), url: d
page = await browser.new_page()
await page.goto(url)
await page.emulate_media(media="screen")
pdf = await page.pdf(width="2160px", height="3840px", landscape=True)
pdf = await page.pdf(width="1440px", height="2560px", landscape=True)
await browser.close()
file = oaiclient.files.create(file=("website.pdf", pdf), purpose="assistants")
assistant = oaiclient.beta.assistants.create(model="gpt-4o", tools=[{"type": "file_search"}], instructions="Du befolgst die dir gegebenen Anweisungen und beachtest dabei die Webseite, welche du als PDF-Datei im Anhang findest.")
Expand Down Expand Up @@ -170,7 +170,7 @@ async def gpt(ctx, prompt: discord.Option(str, description="Der Prompt"), url: d
elif codeinterpreter:
codeinterpreterfile = await filesearch.read()
file = oaiclient.files.create(file=(filesearch.filename, codeinterpreterfile), purpose="assistants")
assistant = oaiclient.beta.assistants.create(model="gpt-4o-mini", tools=[{"type": "code_interpreter"}], instructions="Du befolgst die dir gegebenen Anweisungen und beachtest dabei die Datei, welche du im Anhang findest.")
assistant = oaiclient.beta.assistants.create(model="gpt-4o", tools=[{"type": "code_interpreter"}], instructions="Du befolgst die dir gegebenen Anweisungen und beachtest dabei die Datei, welche du im Anhang findest.")
thread = oaiclient.beta.threads.create()
oaiclient.beta.threads.messages.create(thread.id, role="user", content=prompt, attachments=[{"file_id": file.id, "tools": [{"type": "code_interpreter"}]}])
run = oaiclient.beta.threads.runs.create(thread.id, assistant_id=assistant.id)
Expand Down

0 comments on commit bb138b5

Please sign in to comment.