Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to solve the prompt length #89

Open
ArwaKhalid opened this issue Oct 23, 2023 · 0 comments
Open

how to solve the prompt length #89

ArwaKhalid opened this issue Oct 23, 2023 · 0 comments

Comments

@ArwaKhalid
Copy link

ArwaKhalid commented Oct 23, 2023

hello,
i tried to use your code for a binary classification :
|__________________

`%%time
system_optimized = 'in light of these binary classified examples ....  whether not paraphrased or paraphrased return 0 or 1  without explanation.'
params = {"temperature": 0.0}  
model = "gpt-3.5-turbo" 

ai_2 = AIChat(api_key=api_key, system=system_optimized, model=model, params=params)

predicted_label = []

for i in range(len(train_text)):
         prompt = 'text = ' + train_text[I]
         predicted_label.append(ai_2(prompt))`

it works and returns 0 or 1 but loops only for a few times (5) and then raises an error (the prompt length exceeds the accepted length ) while the max-length of text in my dataset is 200 words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant