Skip to content

Commit

Permalink
tried limiting prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutlope committed Jan 16, 2023
1 parent 3d941d0 commit 493e04c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

## Todos v2

- [ ] Figure out how to hard limit them to 160 character
- [ ] Fix bug in the dropdown where it's not highlighting the currently selected option
- [ ] Rebuild this with a serverless function and run benchmarks on the difference
- [ ] Make better README and add it to templates marketplace
Expand Down
2 changes: 1 addition & 1 deletion pages/api/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const handler = async (req: NextRequest): Promise<Response> => {
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
max_tokens: 1000,
max_tokens: 400,
stream: true,
n: 1,
};
Expand Down
4 changes: 2 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ const Home: NextPage = () => {

const prompt =
vibe === "Funny"
? `Generate 2 ${vibe} twitter bios with no hashtags and clearly labeled "1." and "2.". Make sure there is a joke in there and it's a little ridiculous. Also base it on this bio: ${bio}${
? `Generate 2 ${vibe} twitter bios with no hashtags and clearly labeled "1." and "2.". Make sure there is a joke in there and it's a little ridiculous. Make sure each generated bio is 160 characters max and base it on this bio: ${bio}${
bio.slice(-1) === "." ? "" : "."
}`
: `Generate 2 ${vibe} twitter bios with no hashtags and clearly labeled "1." and "2." based on this bio: ${bio}${
: `Generate 2 ${vibe} twitter bios with no hashtags and clearly labeled "1." and "2.". Make sure each generated bio is 160 characters max and base them on this bio: ${bio}${
bio.slice(-1) === "." ? "" : "."
}`;

Expand Down

0 comments on commit 493e04c

Please sign in to comment.