Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

[Bug]: The text cuts off #556

Open
1 task done
Zapzatron opened this issue Jun 18, 2023 · 0 comments
Open
1 task done

[Bug]: The text cuts off #556

Zapzatron opened this issue Jun 18, 2023 · 0 comments

Comments

@Zapzatron
Copy link

Zapzatron commented Jun 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

The text cuts off

Steps to reproduce the problem

from EdgeGPT.EdgeGPT import Chatbot, ConversationStyle
import asyncio


async def bing_chat(prompt):
    cookies = json.loads(open("cookies.json", encoding="utf-8").read())
    gbot = await Chatbot().create(cookies=cookies)
    response_dict = await gbot.ask(prompt=f"{prompt}", conversation_style=ConversationStyle.precise, simplify_response=True)
    await gbot.close()
    content = response_dict['text']
    return content


text = "Напиши код python webhook для pytelegrambotapi с помощью aiohttp"
print(asyncio.run(bing_chat(text)))

What should have happened?

I was supposed to get a full answer, not half an answer

Version where the problem happens

0.11.1

What Python version are you running this with?

3.10.9

What is your operating system ?

No response

Command Line Arguments

No

Console logs

Вот пример кода webhook для pyTelegramBotAPI с использованием aiohttp:


import logging
import ssl
from aiohttp import web
import telebot

API_TOKEN = '<API_TOKEN>'

WEBHOOK_HOST = '<IP/host where the bot is running>'
WEBHOOK_PORT = 8443  # 443, 80, 88 or 8443 (port need to be 'open')
WEBHOOK_LISTEN = '0.0.0.0'  # In some VPS you may need to put here the IP addr

WEBHOOK_SSL_CERT = './webhook_cert.pem'  # Path to the ssl certificate
WEBHOOK_SSL_PRIV = './webhook_pkey.pem'  # Path to the ssl private key

WEBHOOK_URL_BASE = "https://%s:%s" % (WEBHOOK_HOST, WEBHOOK_PORT)
WEBHOOK_URL_PATH = "/%s/" % (API_TOKEN)

logger = telebot.logger
telebot.logger.setLevel

Additional information

No response

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant