palm api often returns nothing

194 views Asked by At

I'm using the palm api from python - and using either text_generation or chat - it does the same thing. I send in a prompt like:

summarise this:
a bunch of text

and it works perfectly - but I want a summary of my conversation. so if I send in this:

summarise this:
{ "role":"user", "content": "Something" },
{ "role":"assistant", "content" : "some response" },
...

100% of the time, it just returns nothing - and when I say that - if I do:

     completion = palm.generate_text(
                model="models/text-bison-001",
                prompt=prompt,
                temperature=temperature,
                max_output_tokens=2000,
            )

completion.result is None, completion.safety_feeback is empty, completion.candidates is empty and there doesn't appear to be any error field or something I can look at.

Temperature is a variable here because I made a loop to try it with ever increasing values - and it always just returns nothing. I get exactly the same result if I use the palm.chat api.

so it's sort of a two part question:

  1. Is there any way to get palm to summarise a conversation?
  2. is there any way to troubleshoot why palm just returns nothing?
0

There are 0 answers