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 Nov 11, 2024
1 parent eaa13f9 commit 51f59eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,11 @@ async def sonnet(ctx, prompt: discord.Option(str, description="Der Prompt"), url
await page.emulate_media(media="screen")
pdf = await page.pdf(width="1440px", height="2560px", landscape=True)
await browser.close()
message = aclient.messages.create(
message = aclient.beta.messages.create(
model="claude-3-5-sonnet-latest",
betas=["pdfs-2024-09-25"],
max_tokens=8192,
system="Du befolgst die dir gegebenen Anweisungen und beachtest dabei das Bild, welche du im Anhang findest.",
system="Du befolgst die dir gegebenen Anweisungen und beachtest dabei die Webseite, welche du als PDF-Datei im Anhang findest.",
messages=[
{"role": "user", "content": [{"type": "text", "text": prompt}, {"type": "document", "source": { "type": "base64", "media_type": "application/pdf", "data": base64.b64encode(pdf).decode("utf-8")}}]}]
)
Expand Down

0 comments on commit 51f59eb

Please sign in to comment.