"There was an inference error: unknown error: can only concatenate str (not \"dict\") to str"

#21
by breisa - opened

I'm trying to use the inference API, but I'm getting this error:

"There was an inference error: unknown error: can only concatenate str (not \"dict\") to str"

This is my input:

{
  "inputs": {
    "text": "Can you explain this sentence?  The United States also impinges on the global economy as a source of and as a destination for investment capital."
  },
  "options": {
    "wait_for_model": true,
    "use_cache": true
  },
  "parameters": {
    "min_length": 13,
    "top_k": 3,
    "temperature": 0,
    "max_time": 30,
    "max_length": 500
  }
}

I followed the docs. I don't know why it's not working.

Looked through the forums and seems like they changed the api without updating the docs. We should be looking at the text generation task docs instead.

The input should look something like this:

{
  "inputs": "Can you explain this sentence? The United States also impinges on the global economy as a source of and as a destination for investment capital.",
  "options": {
    "wait_for_model": true,
    "use_cache": true
  },
  "parameters": {
    "min_length": 12,
    "top_k": 3,
    "temperature": 0,
    "max_time": 30,
    "max_length": 500
  }
}

Sign up or log in to comment