pydantic : replace uses of __annotations__ with get_type_hints

This commit is contained in:
Francis Couture-Harpin 2024-07-13 16:46:26 -04:00
parent 17eb6aa8a9
commit eed299f0d2
2 changed files with 10 additions and 8 deletions

View file

@ -20,6 +20,8 @@ def create_completion(prompt, grammar):
response = requests.post("http://127.0.0.1:8080/completion", headers=headers, json=data)
data = response.json()
assert data.get("error") is None, data
print(data["content"])
return data["content"]