joeornstein / fuzzylink

Probabilistic Record Linkage Using Pretrained Text Embeddings
https://joeornstein.github.io/software/fuzzylink/
Other
7 stars 0 forks source link

API error: `resp` must be an HTTP response object, not a <httr2_http_500> object #2

Open jakerbrown opened 1 week ago

jakerbrown commented 1 week ago

Hi,

Excited to use this methodology. I am running into an error when running this to link some personnel data (x) to voter data (l). This seems to be a problem on the OpenAI server side, but I was wondering if this was common and/or has a standard fix.

Thank you!

`> df <- fuzzylink(x, l, by = 'name', record_type = 'person', openai_api_key =my_api) Retrieving 2,977,454 embeddings (11:49:08 AM)

Error in FUN():
! resp must be an HTTP response object, not a object.`

joeornstein commented 6 days ago

Hi Jake,

Thanks for the feedback! Yes, it seems like a server-side error, but something I should be able to catch in the function. Do you get this error every time you run the function?

Perhaps it has to do with the number of embeddings. Could you try blocking on last name?

jakerbrown commented 6 days ago

Looks like it is a function of the total number of embeddings. Once I got it under 200,000 embeddings I was able to progress past that error. Thank you!