Works on Python 3.10 VENV in JetBrains PyCharm Community
How to fix this error:
File "D:\CHATBOT\chatbot_init_.py", line 48, in create
if stream else ''.join(engine._create_completion(model.name, messages, stream, **kwargs)))
File "D:\CHATBOT\chatbot\Provider\Providers\Phind.py", line 21, in _create_completion
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
File "C:\Program Files\Python310\lib\subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\Python310\lib\subprocess.py", line 1440, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Не удается найти указанный файл
Code:
@dp.message_handler(content_types=['text'])
async def om(message: types.Message):
if chat == '4':
msg = await message.reply('Ожидайте...')
Works on Python 3.10 VENV in JetBrains PyCharm Community
How to fix this error:
File "D:\CHATBOT\chatbot_init_.py", line 48, in create
if stream else ''.join(engine._create_completion(model.name, messages, stream, **kwargs)))
File "D:\CHATBOT\chatbot\Provider\Providers\Phind.py", line 21, in _create_completion
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
File "C:\Program Files\Python310\lib\subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\Python310\lib\subprocess.py", line 1440, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Не удается найти указанный файл
Code:
@dp.message_handler(content_types=['text'])
async def om(message: types.Message):
if chat == '4':
msg = await message.reply('Ожидайте...')
>>> **await message.reply(text=chatbot.ChatCompletion.create(model='gpt-3.5-turbo', provider=chatbot.Provider.Phind, messages=[
{"role": "user", "content": message.text}], stream=False), parse_mode=ParseMode.MARKDOWN)**~~