We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19b6873 commit 867f444Copy full SHA for 867f444
gramps_webapi/api/resources/chat.py
@@ -22,7 +22,6 @@
22
from marshmallow import Schema
23
from webargs import fields
24
25
-from ..llm import answer_prompt_retrieve
26
from ..util import (
27
get_tree_from_jwt,
28
use_args,
@@ -54,6 +53,9 @@ def post(self, args):
54
53
"""Create a chat response."""
55
require_permissions({PERM_USE_CHAT})
56
check_quota_ai(requested=1)
+ # import here to avoid error if OpenAI-Python is not installed
57
+ from gramps_webapi.api.llm import answer_prompt_retrieve
58
+
59
tree = get_tree_from_jwt()
60
try:
61
response = answer_prompt_retrieve(
0 commit comments