pydantic : replace uses of __annotations__ with get_type_hints (#8474)

* pydantic : replace uses of __annotations__ with get_type_hints

* pydantic : fix Python 3.9 and 3.10 support
This commit is contained in:
compilade
2024-07-14 19:51:21 -04:00
committed by GitHub
parent aaab2419ea
commit 090fca7a07
3 changed files with 46 additions and 34 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"]