Code Monkey home page Code Monkey logo

async-bing-client's Introduction

canxin121's Top Languages

canxin121's Stats

canxin121's Streak

GitRoll Profile Badge

async-bing-client's People

Contributors

canxin121 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

zhuangchengwang

async-bing-client's Issues

Could you provide me with a complete example?

question

I wrote a test code, but it gave an error:
raise Exception(f"Max Retry Exceed: {error}") Exception: Max Retry Exceed: I confirmed that my proxy is not the problem and it can be used for bing chat. Please let me know if there is any issue with my code, here is the code:

code

import asyncio
from pathlib import Path
from async_bing_client import Bing_Client, ConversationStyle

async def main():
    client = Bing_Client(cookie="C:\\Users\\xxxx\\Desktop\\cookies.json", proxy="socks5://127.0.0.1:10801")
    await client.init()

    # 创建新的对话
    chat = await client.create_chat()

    # 与Bing对话
    async for text in client.ask_stream("你知道地球吗?", chat=chat, conversation_style=ConversationStyle.Balanced):
        print(text, end="")

    # 获取缓存的chat列表
    chat_list = client.chat_list

    # 删除某个会话
    conversation_to_delete_id = 'some_conversation_id'
    await client.delete_conversation(conversation_to_delete_id)

    # 批量删除(chat)
    await client.delete_conversation_by_count(count=10)

    # AI画图
    images = await client.draw("一座森林里的小木屋")
    for index, image in enumerate(images):
        print(f"Image {index + 1}: {image.url}")

if __name__ == '__main__':
    asyncio.run(main())

thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.