Browse Source

Fix bug in sendMessage by moving code

pull/203/head
Meir Michanie 8 months ago
parent
commit
566ba8a7bf
  1. 11
      installer/client/cli/utils.py

11
installer/client/cli/utils.py

@ -241,6 +241,11 @@ class Standalone:
presence_penalty=0.1,
)
print(response.choices[0].message.content)
if self.args.copy:
pyperclip.copy(response.choices[0].message.content)
if self.args.output:
with open(self.args.output, "w") as f:
f.write(response.choices[0].message.content)
except Exception as e:
if "All connection attempts failed" in str(e):
print(
@ -256,11 +261,7 @@ class Standalone:
else:
print(f"Error: {e}")
print(e)
if self.args.copy:
pyperclip.copy(response.choices[0].message.content)
if self.args.output:
with open(self.args.output, "w") as f:
f.write(response.choices[0].message.content)
def fetch_available_models(self):
gptlist = []

Loading…
Cancel
Save