-
Here is my code. I am unable to see any console log messages, yet a file is being produced and charging me a few cents. Trying to iterate a prompt over a file with 300 rows, testing it on just 2 rows for now. Working on an independent project, changed the names of the fields for the sake of security for my idea. I'm confused why I don't see any console logs, and why I keep getting errors back for the two fields I want Perplexity to produce: Date and Summary. Any advice? Thank you so much for your time, this is my first ever community post. Tried following documentation, even using the prompt in the Getting Started doesn't work. I pip installed OpenAI by the way. from openai import OpenAI API setupYOUR_API_KEY = "nuhUhUh!" # Replace with your API key File pathsinput_file = r"fileWithDataForPrompts" Load the Excel filetry: Validate headersrequired_headers = ["Enitity", "EntityId", "Name", "Amount", "Date"] Results listresults = [] Testing with the first 2 rowsdata_sample = data.head(2) Process rowsfor index, row in data_sample.iterrows():
Save resultstry: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, we never charge you if the API call fails, but it's not obvious to me if theres a bug in your python post-processing |
Beta Was this translation helpful? Give feedback.
Hey, we never charge you if the API call fails, but it's not obvious to me if theres a bug in your python post-processing