Saravanan666/pypi-org huggingface dataset:
Package: chatpywork
chatpyworkpython wrapper for ChatWork API v2プログラマ的にはSlackなどの方がフレンドリーですが、
事務作業の現場などではChatWorkが使われていることが多いです。
そして、そういう現場こそ、pythonが活躍する本来の場なのでは、と考えています。ChatWorkのAPIくらいなら、requestsから叩くこともできますが、
ChatWorkの投稿の自動化をする際によくあるタスクとして、ファイルのアップロードなどがあります。
特にcsvなどが多いんですね。csv自体にはなんの文句もないんですが、その際、
文字コードや改行コードなどの前時代的な問題が発生してイライラさせられます。今時、UTF-8を「不正なバイナリ」などとして受け入れないプログラムの方がどうかしていますが、
pythonで事務作業を自動化したいと考える日本企業のcsvのターゲットはe飛伝だったりする場合が多く、
これは実態はcp932であるShift_JISしか受け付けないし、CRLF以外の改行コードも改行とはみなしてくれない。
近い将来に対応してくれるともあまり期待できない。というわけで、その苦労の成果だけでも切り出しておこうとしたのが、このパッケージです。ChatWorkのAPIは他にもたくさんありますが、事務で自動化したいと思う案件が多いのは主に作成系であると思われるので、
現状はそこに限ってます。installationpip install chatpyworkUsage送信に必要なroom_idはhttps://www.chatwork.com/#!rid123456789のridの後の数字を使う（ridは含まない）。api_keyは、
ChatWorkのページの右上のアカウントの名前をクリックして出てくるアコーディオンの中にあるAPI設定をクリックして飛んだページで取得できる。import chatpywork
import datetime


room_id = '123456789'
api_key = 'abcdefghi123456789'

account_id1 = 'Account Id1'
account_id2 = 'Account Id2''

room = chatpywork.Room(room_id, api_key)

room.send_message("hello", to={account_id1:"宛先ユーザー"})

room.send_message("hello everyone", toall=True)

room.send_data(binarydata, "image.jpg", "image/jpeg", message="画像です", to={account_id1:"宛先ユーザー"})

room.send_binaryfile("image.png","image/png", message="画像です", to={account_id1:"宛先ユーザー")

room.send_textfile("data.csv","text/csv", fromencode="utf-8", toencode="cp932", fromlinsep="\n", tolinesep="\r\n", message="収集したデータです", to={account_id1:"宛先ユーザー"})

room.send_csv([["ID","名前","年齢"],[1,"山田太郎","24"],[2,"鈴木二郎","30"]], "sample.csv", encode="cp932", linsep="\r\n", message="収集したデータです", to={account_id1:"宛先ユーザー"})

room.send_data_from_url("http://example.com/image.png", headers={"X-token":"some secret tpken"}, params={"q":"query"}, message="webで手に入れた画像です。", to={account_id1:"宛先ユーザー"})

room.send_task("牛乳買って", [account_id1, account_id2], limit=datetime.datetime(2020, 4, 1))公式ドキュメントにはファイルのサイズの上限は5MBとありますが、
どうやらHTTPリクエストのボディ全体のサイズの上限が10MBのようで、それを超えなければ、アップロードできます。データのダウンロード時のエラー、およびファイルの容量オーバーなどは、できる限りChatWorkに送信しますが、
それも動かなければ、全てのメソッドがrequests.postのレスポンスのオブジェクトを返すので、それを使ってデバッグしてください。ChatWorkのAPIの使用制限は今の所５分間あたり300回です。
当たり前ですが、これを超えるとChatWorkにはエラーの通知できませんので、
メソッドの戻り値に含まれるHTTPレスポンスのヘッダーに記載されたAPI使用の残り回数や、
429 Too Many Requestsなどを検知して、他のエラー通知の方法を試みてください。Author淡中☆圏 <tannakaken@gmail.com>Twitter: @tannakaken
Package: chatql
ChatQLGraphQL based chat engineDependenciesThis module depend following system environment.python >= 3.6mongodb >= 4.0Following dependency python modules are installed whenpip install.graphene >= 2.1mongoengine >= 0.16.3DemoYou clone this repository and run following commands.After, you can access GraphQL interfacePOST localhost:8080/graphql.Please check response by GraphQL tool (ex:GraphiQL).docker build ./demo -t chatql
docker run -p 8080:5000 -it chatqlTODOApplication FunctionResponse Generator with Template EngineExtract Entity with Template MatchingNon Text QueryIntent Estimator with Machine LearningExtract Entity with Machine LearningDocumentAPI DocsConditions Pattern DocsResponse DocsLicenseMIT License.
Package: chat-rag
ChatFAQ NLP EngineThis is the NLP Engine for ChatFAQ. It is divided in two modules:Information Retrieval: This module is responsible for retrieving the most relevant answer to a given question.Chatbot: This module is responsible for generating a response to the given question based on the retrieved answer and chat with the user.Information RetrievalTheRetrieveris the main class for the information retrieval system. It takes as input a question (query) and a context and returns the most relevant sentences from the context to the query. This is done using embeddings and the dot product to compute the similarity between the query and the context sentences.ChatbotChatbotTheRetrieverAnswereris the main class for the chatbot. It takes as input a question (query) and a context and returns a response to the query. This is done by first retrieving the most relevant sentences from the context to the query and then generating a response based on the retrieved sentences.Publish packagePYPI testadd repository to poetry configpoetry config repositories.test-pypi https://test.pypi.org/legacy/get token fromhttps://test.pypi.org/manage/account/token/store token usingpoetry config pypi-token.test-pypi pypi-YYYYYYYYPYPI productionget token fromhttps://pypi.org/manage/account/token/store token usingpoetry config pypi-token.chat-rag pypi-XXXXXXXXEach time you need to publishBump versionpoetry version prereleaseorpoetry version patchThen buildpoetry buildPoetry PublishTo TestPyPipoetry publish -r test-pypiTo PyPipoetry publish
Package: chat-replay-downloader
Chat DownloaderA simple tool used to retrieve chat messages from livestreams, videos, clips and past broadcasts. No authentication needed!InstallationInstall usingpippip install chat-replay-downloaderTo update to the latest version, add the--upgradeflag to the above command.Install usinggitgit clone https://github.com/xenova/chat-replay-downloader.git
cd chat-replay-downloader
python setup.py installUsagePython:fromchat_replay_downloaderimportChatDownloaderurl='https://www.youtube.com/watch?v=5qap5aO4i9A'chat=ChatDownloader().get_chat(url)# create a generatorformessageinchat:# iterate over messagesprint(chat.format(message))# print the formatted messageFor advanced python use-cases and examples, consult thePython Wiki.Command line:chat_replay_downloader https://www.youtube.com/watch?v=5qap5aO4i9AFor advanced command line use-cases and examples, consult theCommand Line Wiki.IssuesFound a bug or have a suggestion? File an issuehere. To assist the developers in fixing the issue, please follow the issue template (automatically generated when creating a new issue).ContributingBecome a contributorRun as a developerTo run the program as a developer, you do not need to build anything separately. Simply execute:python -m chat_replay_downloader[work in progress]Add support for a new site:Forkthis repository.Clone the source code with:git clone git@github.com:YOUR_GITHUB_USERNAME/chat-replay-downloader.gitStart a new branch with:cd youtube-dl
 git checkout -b siteRest of guide in progress...Test the programIf you are unable to write code but still wish to assist, we encourage users to run commands with the--testingflag included. This will print debugging messages and pause once something unexpected happens (e.g. when an unknown item is being parsed). If something happens, please raise an issue and we will fix it or add support for it as soon as possible!
Note that this will not affect any output you write to files (using--output).
For example:chat_replay_downloader https://www.youtube.com/watch?v=5qap5aO4i9A --testingSome extractors use undocumented endpoints and may and as a result, users may encounter items which will not be parsed correctly. Increased testing will improve functionality of the software for other users and is greatly appreciated.Chat ItemsChat items are parsed into JSON objects (a.k.a. dictionaries) and follow this template:[work in progress]For a more in-depth output template, consult theItem Wiki.Supported sites:YouTube.com - Livestreams, past broadcasts and premieres.Twitch.tv - Livestreams, past broadcasts and clips.Facebook.com (currently in development) - Livestreams and past broadcasts.TODO list:Finalise unit testingImprove documentationAdd progress bar when duration is knownAdd support for streams by username (i.e. currently live)Websites to add:facebook.com (in progress)vimeo.comdlive.tvinstagib.tvdailymotion.comreddit liveyounow.com=======
History0.0.1 (2020-12-01)First release on PyPI.
Package: chat-research
ChatResearchChatResearch is a tool that uses OpenAI's GPT-3 to accelerate your research.
It provides several features such as generating summary papers, fetching and summarizing papers from arxiv and bioarxiv, generating responses for review comments, and more.:question: Why ChatResearchThere have been countless projects and research initiatives in the field of ChatGPT,
but none have fulfilled my particular needs.
Consequently, I have made the decision to develop my own project.
I am committed to continuously refining and improving this project.
Your support and ratings are greatly appreciated, so please do not hesitate to leave a star.
I also welcome any suggestions, proposals, and pull requests.:rocket: NewsMulti thread and Asynchronous support has been added.GIFs have been added for documentation.Config can now be used to set key.Output for Latex and PDF is now supported.:bookmark: TODOMulti thread and Asynchronous supportAdd GIF for documentUse config to set keySupport output for Latex and PDFFine-tune promptGenerate ImageAdd RSS support for multiple journalRevise help messageadd classic paper as examples:star2: FeaturesChat Config: Generatechatre.tomlin current working directory or set environment variableOPENAI_API_KEY.Chat Paper: Fetch or summary paper from local or arxiv with specified query, research fields, and language.Chat Biorxiv: Fetch and summary paper from bioarxiv with specified category, filter keys, and language.Chat Reviewer: Generate summary paper with specified research fields and language.Chat Response: Generate response for review comment with specified language.Markdown,PDF, andLatex:gear: Installationpip install chat-research:face_with_monocle: UsageChat Config❯ chatre configIt will generatechatre.tomlin current working directory. Otherwise,
setting environment variableOPENAI_API_KEYis another way to config API KEY.
Also,chatre config set OPENAI_API_KEY=sk-keywill create configuration file
in current file directory and set your key assk-key.[OpenAI]OPENAI_API_KEYS=["sk-key1","sk-key2",][Gitee]api="your_gitee_api"owner="your_gitee_name"repo="your_repo_name"path="files_name_in_your_repo"Chat PaperChat BiorxivChat ResponseChat Reviewer> chatre reviewer -husage: chatre reviewer [-h] --paper-path  [--file-format] [--review-format] [--research-fields] [--language]optional arguments:-h, --help          show this help message and exit--paper-path        path of papers--file-format       output file format (default: txt)--review-format     review format--research-fields   the research fields of paper (default: computer science, artificial intelligence and reinforcement learning)--language          output language, en or zh (default: en):facepunch: Develop ToolkitLicenseThis project is licensed under the MIT License - see theLICENSEfile for details.ContributorsYangyang Li:clap: AcknowledgementChatPaperArxiv
Package: chatrouter
Chatrouter is an enhanced router for chatbots and easily integrates with any bot library.key featuresturned complexity into simplicity.from:ifuser_session=="A":...elifuser_session=="B":...elifuser_session=="C":...else:...to:chatbot=chatrouter.group(user_session)r=chatrouter.run(chatbot,msg)Readable route.@chatbot.add_command("call me{my_name}")# orchatbot.add_command("call me{my_name}and{my_friend}")# etccase sensitive and insensitive.default case isinsensitivebut you can addstrict=Trueto a route/command to make it case  sensitive.public and private command.command start with "/" and have description is public command, for example:@chatbot.add_command("/test",description="test command",strict=True)invoke callback anywhere.func=chatrouter.util.get_func("group_name","command_name")auto generated/startand/helpcommand.object storagechatrouter.data_user.installationpip install chatrouterquick example# -*-coding:utf8;-*-importchatrouterchatbot=chatrouter.group("test","this is test bot!")@chatbot.add_command("call me{name}")defsay_handler(name):returnf"hello{name}, nice to meet you!"@chatbot.add_command("repeat me{one}and{two}")defrepeat_handler(one,two):returnf"ok{one}..{two}"@chatbot.add_default_command()defdefault_handler(command):returnf"command{command}not found!"if__name__=='__main__':print(chatrouter.run(chatbot,"/start"))whileTrue:try:i=input("you: ")r=chatrouter.run(chatbot,i)print(f"bot:{r}")exceptBaseExceptionase:print("bot: byebye!")exit(0)for more complex example, please opendemo/telegram_bot.
Package: chatserver
Chat ServerA simple chat server written in python.FeaturesThe features of chatserver include:Optional TLSUser accountsChat RoomsTLS CertificatesSetup is only currently required if you want to use tls.
To do this you need to generate a crt and key file.mkdircertscdcerts
opensslreq-newkeyrsa:2048-nodes-keyoutchatserv.key-x509-days365-outchatserv.crtRunning The ServerPipYou can install chatserver using pip.pipinstall--upgradechatserver
chatserverBuild LocallyMake sure poetry is installed and up to date.pipinstall--upgradepoetryInstall all the dependenciespoetryinstallYou can now run the project from outside poetry's virtual envpoetryrunchatserverOr from within itchatserverIf you want to use TLS you need to set environment variables:CERT_FILEKEY_FILEPORTWith DockerYou can either build locally or use the image from the registry# Build locallydockerbuild-tchatserver.
dockerrun--namechatserver_name-p7878:7878chatserver# Using the image from the registrydockerbuild-tchatserver.
dockerrun--namechatserver_name-p7878:7878registry.gitlab.com/mokytis/python-chatserver:latestTo use tls you will need to mount a direcory containg the crt and key files and set enviornment variables.Example:dockerrun-i-t-d\-p7878:7878\-v/path/to/certs/directory:/certs\-eCERT_FILE='/certs/chatserv.crt'\-eKEY_FILE='/certs/chatserv.key'\--namechatserverchatserverConnecting To The ServerNo TLSIf the server is not using tls you can connect to the server using any TCP client.nclocalhost7878TLSIf the server is using TLS you can connect using opensslopenssls_client-connectlocalhost:7878
Package: chatsonic
ChatSonic API, (Scalable ChatGPT Alternative with real time data)ChatSonic's Python SDK is the perfect solution for anyone looking to integrate an AI-powered Chatbot into their Python-based codebase. With real-time Google data support and a powerful engine that surpasses ChatGPT, ChatSonic's Python SDK is the perfect AI assistant and conversation partner. Easily access the power of ChatGPT API with this SDK and make your codebases smarter than ever. With ChatSonic's Python SDK, you can take your project to the next level.LicenseInstallationpip install chatsonic-pyUsage :fromchatsonicimportConversationchatsonic=Conversation(api_key="your-key-here",enable_memory=True)reply=chatsonic.send_message(message="Hello")print(reply)DocumentationDocumentationFeedbackIf you have any feedback, please reach out to us atsupport@writesonic.com
Package: chatter
The minimalist yet fully featured Chatter API class, heavily inspired by Python Twitter Tools (https://github.com/sixohsix/twitter/).InstallationSimply:$ easy_install chatterEven better:$ pip install chatterChatter API overviewSee this quickstart tutorial:http://www.salesforce.com/us/developer/docs/chatterapi/Content/quickstart.htmfrom Salesforce.UsageInstantiation:client_id = “YOUR_CHATTER_CLIENT_ID”
client_secret = “YOUR_CHATTER_CLIENT_SECRET”
auth = chatter.ChatterAuth(client_id, client_secret)instance_url = “YOUR_USER_INSTANCE_URL”
access_token = “YOUR_USER_ACCESS_TOKEN”
refresh_token = “YOUR_USER_REFRESH_TOKEN”chatter = chatter.Chatter(auth=auth, instance_url=instance_url,access_token=access_token, refresh_token=refresh_token)Get authenticated user’s details:me = chatter.users.me.get()Note ‘GET’ is implied, so you can reduce the above to:me = chatter.users.me()Get another user’s detailsother_user = chatter.users[“005E0000000FpoxIAC”].get()Again, this can be reduced:other_user = chatter.users[“005E0000000FpoxIAC”]()Another way to achieve this, using the ‘_’ magic method:other_user = chatter.users._(“005E0000000FpoxIAC”).get()Updating the authenticated user’s Chatter status:chatter.feeds.news.me.feed_items.post(text=”Hello world!”)Occassionally it is necessary to refresh the user’s access token, due to session expiration. The underlying ChatterCall class will handle this automatically, however you may wish to be notified of access token changes so you can reflect this in your user model.It’s possible to do this via the access_token_refreshed_callback, pass in  a callable, and your callback will get called with the refreshed access token.e.g.def my_callback(access_token):print “New access_token”, access_tokenchatter = chatter.Chatter(auth=auth, instance_url=instance_url,access_token=access_token, refresh_token=refresh_token,
access_token_refreshed_callback=my_callback)The rest is hopefully self-explanatory! :)FeedbackSend feedback / questions etc. to:Email: steve.winton[at]nixonmcinnes.co.uk.Twitter: @steveWINton (http://twitter.com/steveWINton).
Package: chatteract
ChatterAct is a Python package developed to streamline the integration of OpenAI’s GPT-4 function calling capabilities into your applications. Its primary goal is to provide a simplified, yet flexible mechanism for exposing numerous functions to the AI model with minimal effort. ChatterAct handles the execution and piping, enabling you to start simple with one or two AI functions and expand as the complexity of your project grows.Basically, what you need to do to get started is to follow a simple pattern for the functions that you want to expose to GPT, and to use the wrapper for the GPT calling.
Package: chatter-ai-7b
Import:from chatter_ai import AIFunctions:AI.set_api_token(token: str)- set HuggingFace tokenAI.get_answer(question: str)- get answerAI.take_damage_prompt()- take damageUsage:from chatter_ai import AI
AI.set_api_token("YOUR HUGGING FACE TOKEN HERE")
print(AI.get_answer("Hi!")Chatter was based byZephyrMy email:arigadam938@hotmail.comLicense:MIT License
Package: chatterbot-weather
chatterbot-weatherA ChatterBot logic adapter that returns information about the weather.
For more information about ChatterBot seehttps://github.com/gunthercox/ChatterBotDocumentation:https://chatterbot-weather.readthedocs.org.Installationpipinstallchatterbot-weatherExamplefromchatterbotimportChatBotchatbot=ChatBot('My Weather Bot',logic_adapters=['chatterbot_weather.WeatherLogicAdapter'])Contributors Welcomed!This package was originally created as a contribution to the main ChatterBot package.
It was converted to a optional module in order to preserve the code quality of the
main project. This weather adapter for ChatterBot works, but could benefit from
improvements in several areas.Improved documentation with descriptions and information about the functions and structure of the adapterAdditional support for other weather APIsSupport for a wider range of questions about the weather (current, future, specific dates, etc.)History0.1.0 (2016-05-12)First release on PyPI.
Package: chattermark
ChatterMark 💬📝✨Chattermark is a CLI tool that converts GPT chat sessions to a Markdown format, making it easier for you to read, share, or archive your chat sessions. It parses JSON data extracted from a GPT chat session and generates a neat and well-formatted Markdown file.InstallationpipinstallchattermarkUsagechattermarkinput.jsonoutput.mdInputYour input should be a JSON file containing a chat session with a GPT model. The JSON structure should match theGPTChatSessionPydantic model in the code.OutputChattermark will generate a Markdown file with a chronological and easy-to-read representation of the chat session. The output will show user and assistant messages, along with timestamps.ExampleSuppose you have the following JSON data in a file calledinput.json:{"title":"dev(python/chattermark): convert chat GPT sessions to markdown","create_time":1681444192.748429,"update_time":1681446704.0,"mapping":{...}}Run Chattermark:chattermarkinput.jsonoutput.mdThe generatedoutput.mdwill look like this:**2023-04-13 15:30:52 - User:**

Please define a pydantic model for a json representation of a chat GPT session as extracted from a Chrome browser session using the developer tools.

_**2023-04-13 15:31:53 - Assistant:**_

> To create a Pydantic model for a JSON representation of a chat GPT session extracted from a Chrome browser session using the developer tools, you'll first need to identify the data structure and fields in the JSON. ...

---

...Converting Markdown to Other FormatsChattermark generates a Markdown output, which is a versatile and widely supported format. However, you might want to convert the Markdown output to other formats like Word documents, HTML, or PDF. To do this, you can use a tool calledPandoc.Install Pandoc following theofficial installation guide.Run Pandoc to convert the Markdown file to your desired format. For example:To convert the Markdown file to an HTML file:pandocoutput.md-ooutput.htmlTo convert the Markdown file to a Word document:pandocoutput.md-ooutput.docxTo convert the Markdown file to a PDF file:pandocoutput.md-ooutput.pdfCheck thePandoc User's Guidefor more information on available output formats and options.LicenseChatterMark is released under theMIT License.CreditsChatterMark was created by an enthusiastic team of an AI and a developerdeveloperswho believe that fun and productivity can go hand in hand! We hope you enjoy using ChatterMark as much as we enjoyed creating it.
Package: chatter-py
ChatterWelcome to Chatter!Chatter is a framework with the goal of allowing you to quickly and easily create chatbots. It hides
away the things you want to just work, exposing a simple API, so that you can focus on writing your
custom features and delivering a working chatbot.Take a look:fromchatter_pyimportChatClient,Feature,Bot,MessagefromtypingimportAny# Define your featureclassEcho(Feature):defreceive(self,message):self.send_to_chat(message)# Write a handler for your chat client, for example:classMyChatClient(ChatClient):def__init__(self):self.chat_client_connection=Anydefon_chat_message(self,message:dict):"""Receive your chat messages and convert them to bot friendly messages"""bot_message=Message(text=message["text"],room=message["room_id"])self.send_to_bot(bot_message)defstart_listening(self)->None:"""connect to your chat client"""self.chat_client_connection.register_callback(self.on_chat_message)self.chat_client_connection.start_listening()defsend_to_client(self,message):"""Format your bot messages and send them off to your chat client"""text="<p>"+" ".join(message.text)+"</p>"self.chat_client_connection.send(text)defmain():# Let Chatter put it all togetherBot(MyChatClient(),[Echo]).start()if__name__=='__main__':# Start your bot!main()Chatter encourages you to separate concerns by keeping your chat client specific message
transformations in yourChatClientclasses and letting all yourFeatureclasses handle
standardisedMessages. This:Makes your code more testableMakes your bot super portable - being able to handle a new chat client is as simple as creating a
newChatClientsubclass and writing your custom logic for transforming messages between Bot and
Presentation format.You could even use a command-line frontend for testing your bot's logic:fromchatter_pyimportChatClient,MessageclassCommandLine(ChatClient):defsend_to_client(self,message:Message):print("Chatter-bot: "+" ".join(message.text))defstart_listening(self)->None:whileTrue:input_message=input("You: ")message_to_bot=Message(text=input_message.split(" "),room="")self.send_to_bot(message_to_bot)Now every time you write a new chat client class, all you have to focus on testing is given a Bot
message, you receive the correct chat message, and vice versa - simple!