Skip to content

Commit 258fb3a

Browse files
committed
add a response when query without model instance
1 parent 66dd34a commit 258fb3a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ def get_response(query: str) -> str:
132132
response = model.run(query)
133133
app_logger.info(f'\033[36mLLM Response: {response}\033[0m')
134134
return response
135+
return (
136+
'Your model still not created.\n'
137+
'1. If you are using gpt4free model, '
138+
'try to re-select a provider. '
139+
'(DeepAI, ChatgptAi are more stable)\n'
140+
'2. If you are using openai model, '
141+
'try to re-pass openai api key.'
142+
)
135143
except Exception as e:
136144
app_logger.info(f'{__file__}: {e}')
137145
return (

0 commit comments

Comments
 (0)