Skip to content

Commit c234868

Browse files
committed
Format code
1 parent fc27ae7 commit c234868

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

client/h2ogpt_client/_core.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def create(
7070
number_returns: int = 1,
7171
system_pre_context: str = "",
7272
langchain_mode: LangChainMode = LangChainMode.DISABLED,
73-
system_prompt: str = '',
73+
system_prompt: str = "",
7474
) -> "TextCompletion":
7575
"""
7676
Creates a new text completion.
@@ -96,7 +96,8 @@ def create(
9696
:param system_pre_context: directly pre-appended without prompt processing
9797
:param langchain_mode: LangChain mode
9898
:param add_chat_history_to_context: Whether to add chat history to context
99-
:param system_prompt: Universal system prompt to override prompt_type's system prompt
99+
:param system_prompt: Universal system prompt to override prompt_type's system
100+
prompt
100101
"""
101102
params = _utils.to_h2ogpt_params(locals().copy())
102103
params["instruction"] = "" # empty when chat_mode is False
@@ -117,7 +118,7 @@ def create(
117118
params["document_choice"] = []
118119
params["pre_prompt_summary"] = ""
119120
params["prompt_summary"] = ""
120-
params['system_prompt'] = ''
121+
params["system_prompt"] = ""
121122
return TextCompletion(self._client, params)
122123

123124

@@ -187,7 +188,7 @@ def create(
187188
number_returns: int = 1,
188189
system_pre_context: str = "",
189190
langchain_mode: LangChainMode = LangChainMode.DISABLED,
190-
system_prompt: str = '',
191+
system_prompt: str = "",
191192
) -> "ChatCompletion":
192193
"""
193194
Creates a new chat completion.
@@ -212,7 +213,8 @@ def create(
212213
:param number_returns:
213214
:param system_pre_context: directly pre-appended without prompt processing
214215
:param langchain_mode: LangChain mode
215-
:param system_prompt: Universal system prompt to override prompt_type's system prompt
216+
:param system_prompt: Universal system prompt to override prompt_type's system
217+
prompt
216218
"""
217219
params = _utils.to_h2ogpt_params(locals().copy())
218220
params["instruction"] = None # future prompts
@@ -224,7 +226,7 @@ def create(
224226
params["instruction_nochat"] = "" # empty when chat_mode is True
225227
params["langchain_mode"] = langchain_mode.value # convert to serializable type
226228
params["add_chat_history_to_context"] = False # relevant only for the UI
227-
params["system_prompt"] = ''
229+
params["system_prompt"] = ""
228230
params["langchain_action"] = LangChainAction.QUERY.value
229231
params["langchain_agents"] = []
230232
params["top_k_docs"] = 4 # langchain: number of document chunks

0 commit comments

Comments
 (0)