Promptify icon indicating copy to clipboard operation
Promptify copied to clipboard

Relation extraction not working

Open hitsense opened this issue 2 years ago • 3 comments

Hi @monk1337,

I guess something in text_input parameter of nlp_prompter changed after the recent updates you made. Check the attached screenshot, which I tried on your few shot example.

image

hitsense avatar Apr 11 '23 09:04 hitsense

Hi, You have to pass the template and model in Prompter and in fit function you provide the sentence.

example

prompter = Prompter(model=model, template = 'relation_extraction.jinja')
output = prompter.fit(text_input = sentence, domain = "medical", labels = None)

monk1337 avatar Apr 11 '23 10:04 monk1337

Thanks @monk1337, this works.

Any plans to include langchain's get_openai_callback() method to get the token and cost information.

hitsense avatar Apr 11 '23 11:04 hitsense

doesn't the raw openai call provide that anyways?

krrishdholakia avatar Aug 04 '23 21:08 krrishdholakia