mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
feat: update prompt generate (#6516)
This commit is contained in:
5 files changed
+217
-93
No files matched your search
@@ -262,6 +262,10 @@ You should also complete the text started with ``` but not tell ``` directly.
|
||||
:param prompt_messages: prompt messages
|
||||
:return: llm response
|
||||
"""
|
||||
if response.status_code != 200 and response.status_code != HTTPStatus.OK:
|
||||
raise ServiceUnavailableError(
|
||||
response.message
|
||||
)
|
||||
# transform assistant message to prompt message
|
||||
assistant_prompt_message = AssistantPromptMessage(
|
||||
content=response.output.choices[0].message.content,
|
||||
|
||||
Reference in new issue
Block a user