Saravanan666/pypi-org huggingface dataset:
Package: chatgptcode
Chat GPT CodeThis extension is for terminal based AI assisted programming. It takes advantage of the ChatGPT python package and has additional formatting to make it easier to use for developers.InstallationI'll publish a pip package soon, but for now you can install it by cloning the repo and running the following from the project's root directory.>gitclonehttps://github.com/BrianKmdy/ChatGPTCode.git
>cdChatGPTCode
>pipinstallpoetry
>poetryinstallSetupCreate a file calledconfig.jsonin folder.gptcodein your home directory. The file should be formatted as follows, wheresession_tokenreferers to the__Secure-next-auth.session-tokento the browser cookie found on the chat GPT website (see terry3041's guide for additional info):{"session_token":"eyJhbGciOiJkaXIiL...",}UsageTo run the app with poetry use the following command. In order for this to work you'll need to have chrome or chromium installed. A browser instance will pop up, connect to chat GPT, and then will automatically be hidden from view.>poetryrunpython-mgptcodeYou can then ask chat GPT questions and get a response in your terminal! With nicely formatted code and easy to read output.Thanks so much to useracheong08for the amazingChatGPT Python packagewhich this is based on!
Package: chatgpt-command
Talk to ChatGPT from your terminal.QuickstartFirst you'll need to install the CLI:pip install chatgpt-cliThen, you'll need a OPENAI API key (you can get onehere), and you'll need to export your API Key as an environment variable:export OPENAI_API_KEY=<your api key>Then you can start a conversation with ChatGPT:chatgpt what is 2 + 2You can also send multiline messages:chatgpt '''
    Make this sentence more sophisticated:

    I like to eat pizza
    '''Your messages in each terminal window are saved to~/.chatgpt/{OS boot time}/{terminal pid}/chatlog.json. This means you can ask follow-up questions in a terminal window and start a new conversation by opening a new window.SettingsUse a different model, like GPT-4By default, the CLI uses thegpt-3.5-turbomodel.However, you can use a different model by passing the--modelflag:chatgpt --model=gpt-4 Complete this phrase: "Ravioli ravioli, give me the..."You can also change the default model by setting theCHATGPT_CLI_MODELenvironment variable:export CHATGPT_CLI_MODEL=gpt-4NOTE: The gpt-4 model is not yet available to everyone. You can join the wailisthere.Increase the request timeoutBy default, the CLI will wait 120 seconds for a response from the API. You can increase this timeout by setting theCHATGPT_CLI_REQUEST_TIMEOUT_SECSenvironment variable:export CHATGPT_CLI_REQUEST_TIMEOUT_SECS=600
Package: chatGPT-debugger
ChatGPT DebuggerThis package allows you to debug Python code with the help ofChatGPT3, a large language model developed by OpenAI. Instead of just getting an error message when running your code, you will get a more detailed explanation of why the error occurred, how to fix it, and a corrected version of the code. This can save you time and effort in trying to figure out why your code is not working, and give you a better understanding of how to fix it. The package integrates ChatGPT3's advanced language processing capabilities to provide you with accurate and helpful debugging information. Whether you're a beginner or an experienced programmer, the ChatGPT_debugger can help you write better and more efficient code.InstructionsInstall:pip install chatGPT_debuggerHow to Debug Python code with ChatGPT_debugger:The ChatGPT_debugger package offers an easy way to debug your Python code. To use it, simply add the debug decorator to the function you want to debug. For example:fromchatGPT_debugger.chatGPT_debuggerimportdebug@debugdefcalculate_age(date_of_birth:int)->int:current_year="2023"age=current_year-date_of_birthreturnagecalculate_age(2000)By using the debug decorator, instead of encountering an error, you will receive output explaining why the error occurred, how to fix it, and the corrected code, among other things."The Benefits of ChatGPT_debuggerThe ChatGPT_debugger package is an extremely useful tool for beginner Python programmers. Debugging code can often be a challenging and time-consuming task, especially for those who are just starting out. With the ChatGPT_debugger, however, debugging is made simple and intuitive. By simply adding the debug decorator to your code, you can receive detailed information about any errors or issues, including explanations, suggestions for fixing the problem, and corrected code. This makes it easier for beginner programmers to identify and resolve problems, allowing them to focus on writing and improving their code. The ChatGPT_debugger is an excellent resource for anyone looking to streamline their debugging process and become more confident in their Python programming skills.
Package: chatgptdevfriendly
ChatGPTDevFriendlyThis package can be used by developers to quickly develop ChatGPT applications with the robustness
and boilerplate code being taken care of by this wrapper.Requirementspip install chatgptdevfriendlyUsageAll the source code is currently insrcdirectory and also intestswith sample usage intest_main.py. You will need anOpenAI keyto use this.fromchatgptdevfriendly.v1importChatGptSmartClientchatgpt_client=ChatGptSmartClient(openai_api_key,model_name)# We can query with some previous context and also decide whether to add a prompts answer to the contextprompt="List the top 10 upcoming startups in India?"response,response_id=chatgpt_client.query(prompt,w_context=True,add_to_context=True)print(f"The answer from ChatGPT is{response}")# We build on previous context but do not add the current prompts answer to contextprompt="Ok thanks, can you give me the valuation of these startups in tabular format"response=chatgpt_client.query(prompt,w_context=True,add_to_context=False)...FeaturesSave Conversations to a fileResume conversations by loading context from a file.Retry logic in case of API failures.Regular Trimming of context to 4000 tokens so that limit of 4097 is not breached.Total token and token vs time metric.Retries: This is incase of failures like connection based request exceptions, API errors.(openai) C:\Users\Srinivas\OneDrive\Desktop\StartupSearchGPT\tests>python test_main.py
    Error occurred: API error , please try later
    Retrying after 3 seconds...
    Error occurred: API error , please try later
    Retrying after 6 seconds...
    Error occurred: API error , please try later
    Retrying after 12 seconds...
    Error occurred: API error , please try laterContext trimming: Context is trimmed as needed when the limit breaches 4000 tokens.Tracking metrics such as average time per response and total token usage.04-10-2023 10:26:44 | INFO | The time taken for this response is : 7.85 seconds

    04-10-2023 10:34:34 | INFO | The total tokens used up-till now is: 665
    04-10-2023 10:34:34 | INFO | The average response time is: 10.28 secchatgpt_client.print_metrics()Erasing Context: We can erase all previous chat history to star from fresh.chatgpt_client.erase_history()Rollback: we can rollback to a particular Chatresponse context to an restart from there.chatgpt_client.rollback_conversation(response_id)Embeddings: We can get the query embeddings and cache them for further use. (In developement)chatgpt_client.get_embeddings()ContributionsThis project is meant to make the chatgpt developer life easy, so please do add any featues you feel is needed! Also if you fnd it useful please leave a star!!
Package: chatgpt-dnac-analyzer
chatGPT_Meraki_Event_AnalyzerA chatGPT / Meraki SDK Python powered event analyzerCurrent API CoverageNetwork EventsCurrent chatGPT PromptsNetwork Events{"role":"system","content":"You are a network troubleshooting tool"},{"role":"user","content":f"Please describe the following ncondition { event }"},{"role":"system","content":"You are a chatbot"},{"role":"user","content":f"Please describe the following network condition { event } and explain it like I'm 5"},{"role":"system","content":"You are a network troubleshooting tool"},{"role":"user","content":f"Is the network event { event } a problem with the network?"}{"role":"system","content":"You are a network troubleshooting tool"},{"role":"user","content":f"How do I troubleshoot a { event } problem with Meraki?"},Installation$python3-mvenvmeraki$sourcemeraki/bin/activate(meraki)$pipinstallchatgpt_meraki_analyzerUsage - Environment Variables - IMPORTANTPlease export / setup this environment variable prior to running vivlio(meraki)$exportMERAKI_DASHBOARD_API_KEY=<MerakiAPIToken>Also please create a .env file with the followingRequired
OPENAI_KEY=""Available from platform.openai.com** Optional for WebEx MessagesWEBEX_TOKEN=""
WEBEX_ROOMID=""Usage - In-line(meraki)$chatgpt_meraki_analyzerAlways On SandboxThis code works with the always on sandbox!https://devnetsandbox.cisco.com/RM/Diagram/Index/a9487767-deef-4855-b3e3-880e7f39eadc?diagramType=Topologyexport MERAKI_DASHBOARD_API_KEY=fd6dd87d96915f21bc0e0b3d96a866ff0e53e381ContactPlease contact John Capobianco if you need any assistance
Package: chatgpterminal
Terminal CLI for GPT modelsPrerequisitesGet access to the OpenAI API under:https://openai.com/productOnce you have access, export your Organization-ID
(https://platform.openai.com/account/organization) and your API-Key
(https://platform.openai.com/api-keys) in your shellexportOPENAI_API_KEY="your_key"exportOPENAI_ORGANIZATION="your_organization_id"InstallationInstall via pip:pipinstallchatgpterminal# start chatting withgptNot yet implementedSaving of conversationsSystem communicationconversation saving and managementCorrect messagesImage Models? (Distant future)
Package: chatgpt-function
ChatGPT Function WrapperOverviewThis project provides a Python function wrapper that simplifies the process of converting functions with docstrings into callable functions for ChatGPT. It parses the docstring of a function and creates a description that ChatGPT can use.InstallationYou can install this package using pip:pipinstallchatgpt-functionUsageImport thechatgpt_functionmodule:fromchatgpt_functionimportchatgpt_wrapperDefine your function with a docstring using the@chatgpt_wrapperdecorator:@chatgpt_wrapperdefmy_function(my_arg:str)->str:'''This is my function.Args:my_arg (str): This is my argument.Returns:str: This is my return value.'''return"Hello World!"+my_argAccess the function's description usingchatgpt_function():function_description=my_function.chatgpt_function()This will provide you with a JSON-like description that you can use as input to ChatGPT.Use the function in ChatGPT:fromopenaiimportChatCompletionresponse=ChatCompletion.create(messages=messages,functions=[function_description],**kwargs)LicenseThis project is licensed under the MIT License.MIT LicenseCopyright (c) 2023 Ron HeichmanPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: chatgpt-functions
Example of usage:importasynciofromchatgpt_functionsimport(ChatGPT,Message,Roles,ChatGptFunction,Parameters,Property,)fromconfigimportAPI_KEYchatgpt=ChatGPT(openai_api_key=API_KEY)asyncdefmain():defsay_hello(args):print(args)awaitchatgpt.get_chatgpt_response_with_functions(functions=[ChatGptFunction(function=say_hello,parameters=Parameters(properties=[Property(property_name="name",prop_type="string",description="Name who to say hello to",enum=["Evan","Micha"],),Property(property_name="text",prop_type="string",description="Greeting",),]),function_description="Say hello to user",)],messages_to_set=[Message(role=Roles.USER,content='РЎРєР°Р¶Рё РїСЂРёРІРµС‚РёРє РјРёС‡Рµ')])loop=asyncio.new_event_loop()asyncio.set_event_loop(loop)loop.run_until_complete(main())
Package: chatgpthub
ChatGptHub: Gpt Chatbot Library with LangChain SupportThis repo is a implementation of the ChatGPT Models withLangChainsupport.InstallationpipinstallchatgpthubUsagefromchatgpthubimportChatGptHubDemo# translate chatgpt modeldemo=ChatGptHubDemo(openai_key="openai_key",promptlayer_key="promptlayer_key",#optional)# translate chatgpt modeldemo.translate(model_name="gpt-3.5-turbo",input_language="English",output_language="Turkish",text="Hello, how are you?",temperature=0.0,)# promptlayer chatgpt modeldemo.promptlayer(model_name="gpt-3.5-turbo",text="Hello, how are you?",temperature=0.0,)# custom template chatgpt modeltemplate="You are a helpful assistant that python to c++ and you are asked to translate the following text:{text}"text="print('Hello, world!')"output=demo.custom_template(model_name="gpt-3.5-turbo",template=template,input_variables="text",text=text,temperature=0.0,)
Package: chatgptmax
chatgptmaxA Python package for sending long input text to OpenAI's GPT models using message chunking.Read theblog postthat inspired this project.InstallationYou can installchatgptmaxusing pip:pipinstallchatgptmaxUsageHere's are basic usage examples of thechatgptmaxmodule. This assumes you have anOpenAI API key set upas an environment variable,OPENAI_API_KEY.You can also try outchatgptmaxusingthe Jupyter notebook provided here.Clean text with preprocessingSuppose you have a file namedsample.txtwith the following content:This is a sample text. It contains some stop words that should be removed. We will use the chatgptmax module to clean and process this text.You can use theclean.text_from_filemethod to read and clean the text from this file:fromchatgptmaximportclean# Specify the path to your filefile_path="sample.txt"# Clean and process the text from the filecleaned_text=clean.text_from_file(file_path)# Print the cleaned textprint(cleaned_text)This code will read the content ofsample.txt, remove common stopwords, and print the cleaned text:This sample text contains stop words removed. We chatgptmax module clean process text.Send lots of text to ChatGPTYou can use thesendfunction to send a prompt along with a large amount of text data from a file to ChatGPT:fromchatgptmaximportsend,read_data# Define the path to your text filefile_path="path_to_your_file.txt"# Read the text data from the filetext_data=read_data(file_path)# Define your promptprompt_text="Summarize the following text for me:"# Send the text data to ChatGPT for summarizationresponses=send(prompt=prompt_text,text_data=text_data)# Print ChatGPT's responsesforresponseinresponses:print(response)This code will send the cleaned text as text data to ChatGPT along with the prompt. ChatGPT will provide responses based on your prompt and text data.Please make sure you have yourOpenAI API key properly set upas an environment variable or using a secret management service for this example to work.For more examples and instructions, readthe documentationDocumentationFor more information on how to use chatgptmax, please refer to the officialdocumentation.ContributingIf you'd like to contribute to this project, please read ourContribution Guidefor details on how to get started.LicenseThis project is licensed under the MIT License - see the LICENSE file for details.
Package: chatgpt-memory
ChatGPT MemoryAllows to scale the ChatGPT API to multiple simultaneous sessions with infinite contextual and adaptive memory powered by GPT and Redis datastore.Getting StartedCreate your freeRedisdatastorehere.Get yourOpenAIAPI keyhere.## set the following ENVIRONMENT Variables before running this scriptfromchatgpt_memory.environmentimportOPENAI_API_KEY,REDIS_HOST,REDIS_PASSWORD,REDIS_PORTfromchatgpt_memory.datastore.configimportRedisDataStoreConfigfromchatgpt_memory.datastore.redisimportRedisDataStorefromchatgpt_memory.llm_client.openai.conversation.chatgpt_clientimportChatGPTClientfromchatgpt_memory.llm_client.openai.conversation.configimportChatGPTConfigfromchatgpt_memory.llm_client.openai.embedding.configimportEmbeddingConfigfromchatgpt_memory.llm_client.openai.embedding.embedding_clientimportEmbeddingClientfromchatgpt_memory.memory.managerimportMemoryManagerembedding_config=EmbeddingConfig(api_key=OPENAI_API_KEY)embed_client=EmbeddingClient(config=embedding_config)redis_datastore_config=RedisDataStoreConfig(host=REDIS_HOST,port=REDIS_PORT,password=REDIS_PASSWORD,)redis_datastore=RedisDataStore(config=redis_datastore_config)redis_datastore.connect()redis_datastore.create_index()memory_manager=MemoryManager(datastore=redis_datastore,embed_client=embed_client,topk=1)chat_gpt_client=ChatGPTClient(config=ChatGPTConfig(api_key=OPENAI_API_KEY,verbose=True),memory_manager=memory_manager)conversation_id=NonewhileTrue:user_message=input("\nPlease enter your message: ")response=chat_gpt_client.converse(message=user_message,conversation_id=conversation_id)conversation_id=response.conversation_idprint(response.chat_gpt_answer)
Package: chatgpt-meraki-analyzer
chatGPT_Meraki_Event_AnalyzerA chatGPT / Meraki SDK Python powered event analyzerCurrent API CoverageNetwork EventsCurrent chatGPT PromptsNetwork Events{"role":"system","content":"You are a network troubleshooting tool"},{"role":"user","content":f"Please describe the following ncondition { event }"},{"role":"system","content":"You are a chatbot"},{"role":"user","content":f"Please describe the following network condition { event } and explain it like I'm 5"},{"role":"system","content":"You are a network troubleshooting tool"},{"role":"user","content":f"Is the network event { event } a problem with the network?"}{"role":"system","content":"You are a network troubleshooting tool"},{"role":"user","content":f"How do I troubleshoot a { event } problem with Meraki?"},Installation$python3-mvenvmeraki$sourcemeraki/bin/activate(meraki)$pipinstallchatgpt_meraki_analyzerUsage - Environment Variables - IMPORTANTPlease export / setup this environment variable prior to running vivlio(meraki)$exportMERAKI_DASHBOARD_API_KEY=<MerakiAPIToken>Also please create a .env file with the followingRequired
OPENAI_KEY=""Available from platform.openai.com** Optional for WebEx MessagesWEBEX_TOKEN=""
WEBEX_ROOMID=""Usage - In-line(meraki)$chatgpt_meraki_analyzerAlways On SandboxThis code works with the always on sandbox!https://devnetsandbox.cisco.com/RM/Diagram/Index/a9487767-deef-4855-b3e3-880e7f39eadc?diagramType=Topologyexport MERAKI_DASHBOARD_API_KEY=fd6dd87d96915f21bc0e0b3d96a866ff0e53e381ContactPlease contact John Capobianco if you need any assistance
Package: chatGPTMidJourneyPrompt
ChatGPT-MidJourney-promptThis is a ChatGPT based prompt generation model for MidJourney. The purpose of this model is to simplify the creation of images and increase their creativity. By introducing a partial hint, ChatGPT creates a follow-up that can be used to stimulate creativity and provide new ideas.What's new24.03.2023Create PyPi project. Update file structure, add api key authentication to ChatGPT.CLI-app and discord-bot will be available within a few days.InstallationpipinstallchatGPTMidJourneyPromptUsagefromchatGPTMidJourneyPrompt.mjPromptimportPromptGenerator# supported authorization methods: via email and password, via token, via api keyconfig={"email":"your_email","password":"your_password",# or"session_token":"your_session_token",# or"api_key":"your_api_key",}promptGenerator=PromptGenerator(config)prompt=promptGenerator.V5("any text")prompt=promptGenerator.V4("any text")prompt=promptGenerator.niji("any text")prompt=promptGenerator.testp("any text")# or advanced usage if neededpromptConfig={"model":"artistic","type":"anime","renderer":"ray tracing","content":"character","aspect_ratio":"1:5","color":"red","url":"example image url",}prompt=promptGenerator.V5("any text",config=promptConfig,words=50)More about configAll config propertiesmodeltyperenderercontentaspect_ratiocolorurlweights, artisticanime, photorealistic, avatar, couple avataroctane, unreal engine, ray tracing, mixedcharacter, landscape, object, light, particlesdepends on the modelanyanyAspect ratiosV5V4nijitestpany1:1, 1:2, 2:1, 2:3, 3:2, 4:5, 5:4, 4:7, 7:4, 16:9, 9:161:2, 2:12:3, 3:2Model properties supportpropertyV5V4nijitestpmodel+++-type++--renderer+++-content+++-aspect_ratio++++color+++-url++++ResultsSee more examples in mygalleryShort-weights modelprompt:Sakura blossoms::5, pink flowers::4, Licorice plant::3, Japanese landscape::5, octane render::4, landscape desing::4, red::10, purple::10, , high quality photo::5, soft light::2, sharp-focus::3, hyper realism::4 --v 4 --s 1000 --q 5 --ar 16:9prompt:Stars::5, galaxy::4, space::5, , , , --v 4 --ar 3:2 --s 1000 --q 5 --ar 1:2Artistic modelprompt:Elven assassin with a masked face and intricate runes. Highly detailed photorealism showcases the intricate details of the mask and runic markings. Focused on the assassin's face, with a blurred background. The lighting is a blend of candlelight and twilight, adding a sense of mystery to the character. The style is a mix of ancient and fantasy. Resolution: --ar 16:9 --s 1000 --q 2 --upbeta --v 4prompt:An elven warrior girl wielding a sword, dressed in armor made of intricate metals and fabrics. She stands against a futuristic background with high-tech elements, rendered with the latest technologies. Focused, blurred background, full-body::5 soft light::1 high quality photo::1 --v 4 --ar 3:2 --s 1000 --q 5Nijiprompt:Stray dog::3, samurai::5, katana::5, dirt road::3, countryside::3, --niji --q 2LicenseThis project is licensed under the MIT License.AcknowledgmentsThanks a lot to the development of AI and separately toChatGPTfor generating the Readme.
And alsoacheong08for creatingChatGPT.FutureMore advanced options for generating prompts