Open
Description
I have an issue with truncated output in the objectid
property. When I execute the generation it only returns 11 characters. Is the number of characters limited for strings? The model is mistralai/Mistral-7B-Instruct-v0.3
. I provide a minimal example below.
Minimal example:
json_schema = {
'type': 'object',
'properties': {
'objectid': {'type': 'string'},
'type': {
'type': 'array',
'items': {'type': 'string'},
}
}
}
prompt = '''Determine the type of this review in the content property. Possible value are "complaint", "praise".
###
{
"objectid": "674f3f9df09d1cb1ddc55212",
"content": "I hate this company",
}
###
'''
jsonformer = Jsonformer(
model,
tokenizer,
json_schema,
prompt,
)
generated_data = jsonformer()
print(generated_data)
Result:
{'objectid': '674f3f9df09', 'type': ['complaint']}
Metadata
Metadata
Assignees
Labels
No labels