Saravanan666/pypi-org huggingface dataset:
Package: gpt-address-api
GPT Address API (GPTAAPI) for NarunoGPTAAPI is a decentralized API for OpenAI GPT. It allows you to use GPT without exposing your API key to the public. It is based on theNarunoblockchain and uses theNaruno APIto communicate with the blockchain. GPTAAPI is written in Python and uses theOpenAI GPT-3 APIto communicate with GPT.FeaturesDecentralized systemSecure communication between nodesFast and easy to useSecure point for GPT API'sUses encryption to protect sensitive informationInstallationYou can install GPTAAPI by pip3:pip3 install gpt_address_apiUsage*If you want to use gpt_address_api you must to use Naruno. For now please checkout theBaklava Testnet.Getting address of client and server:narunocli -pwServerFor accessing your gpt api on blockchain you should create a gpt_address_api, giving trusted user addresses and api_key.fromgpt_address_apiimportgptaapimy_gptaapi_server=gptaapi("MyNarunoPass")my_gptaapi_server.set_encrypt_key("mystrongencrypt_key")my_gptaapi_server.set_api_key("my_open_ai_api_key")my_gptaapi_server.add_user("client_address")my_gptaapi_server.run()also you can use in command line:gptaapi --password MyNarunoPass --encrypt_key "mystrongencrypt_key" --trusted_users ["client_address"] --api_key my_open_ai_api_key runClientTo use gptaapi, you can call the gptaapi.ask function with your blockchain address, message and encryption key as the parameter:fromgpt_address_apiimportgptaapimy_gptaapi_client=gptaapi("MyNarunoPass")response=my_gptaapi_client.ask("server_address","Hello gpt, how are you","mystrongencrypt_key")print(response)my_gptaapi_client.close()also you can use in command line:gptaapi --password "MyNarunoPass" ask "server_address" "Hello gpt, how are you" "mystrongencrypt_key"This will return the response of gpt result.ContributingContributions to gptaapi are welcome! If you have any suggestions or find a bug, please open an issue on the GitHub repository. If you want to contribute code, please fork the repository and create a pull request.Licensegptaapi is released under the MPL-2.0 License.
Package: gptagger
GPTagger :label:GPT Tagger is a powerful text tagger that makes use of the GPT model. This tool allows you to extract tags from a given text by leveraging the capabilities of GPT. However, using GPT as a text tagger is not a trivial task. GPT has the tendency to generate non-existing, fabricated, or processed text. To mitigate this issue, GPT Tagger provides a reliable method to ensure that the generated tags are derived from the input text while allowing GPT to process the extracted tags to some extent.Below is an example of how GPT may respond wrong.Text: "I earn $1000 this week!"
Prompt: "Extract how much he/she earns"# Non-existent textGPT: "one thousand dollar"# Make-up textGPT: "$999999"# Processed textGPT: "$1,000"IntroductionThese incorrect responses highlight the importance of using a reliable tag extraction tool like GPT Tagger. To do that, GPT Tagger follows a set of main steps:🕵️‍♀️ Extraction: GPT Tagger sniffs out all possible tags by following your instructions to GPT.🔍 Indexing: It spots the exact locations of these tags within the text.✅ Validator: GPT Tagger's trusty validator steps in to validate if the extracted tags pass the rule-based and ML-based checks.Check the example above how we extract ingredients from a yummy recipe text. 😋Features ✨Scale up GPT annotators and use switch between GPT3.5 and GPT4 easilyWant to have a higher precision? try using GPT-4!Want to have a higher recall? Scale up the number of GPT annotators!Instead of making a perfect prompt, use validator to shave off bad extractionsSimple validator: Length, Regex...ML validator: GPT validator (Consider it like a chain of GPTs!)How to Use 🚀SetupmakeinstallexportOPENAI_API_KEY=<your-key>Pre-defined NER pipelineThe easiest way to dive into the GPT Tagger is through the Gradio web demo! Fire it up with a single command:poetryrunpythonGPTagger/app.pyIf you prefer having the power of GPT Tagger at your fingertips in Python, check out this snippet:frompathlibimportPathfromGPTaggerimport*cfg=NerConfig(tag_name='date',tag_regex=r"\d",tag_max_len=128,)prompt=PromptTemplate.from_template(Path('<path-to-prompt>').read_text())pipeline=NerPipeline.from_config(cfg)doc=Path('<path-to-doc>').read_text()tags=pipeline(doc,prompt)Build Custom Pipelines 🎉We believe that the possibilities of using GPT as a text tagger are endless! We invite you to contribute your own custom pipelines. Together, we'll unlock the true potential of GPT Tagger and make text tagging an better experience.Leave a star if you find GPTagger is useful for your product or company! 🌟
Package: gpt-all-star
AI-powered code generation tool for scratch development of web applications with a team collaboration of autonomous AI agents.
This is a research-project, and its primary value is to explore the possibility of autonomous AI agents.Table of contents🏛 Concept🐳 Getting Started🔎 Examples🏛 ConceptBuild Team, Build App: Simply organize your team and decide on what to build.AI Agent Collaboration: Assemble a group of AI agents and work together to carry out the steps.Choose the right ｌeader for each step.Leaders create a plan of action for each step.Work with team members to complete every task in the action plan.🐳 Getting Started:bulb: While it's entirely feasible to launch the application on your local machine directly, westrongly recommendusingDockerfor starting up the application.Clone the repository$gitclonegit@github.com:kyaukyuai/gpt-all-star.gitEdit the.envfile$mv.env.sample.envRundocker compose buildanddocker compose up$makebuild
$makeupOpen the web terminalport 7681Open:http://localhost:7681Install dependencies$poetryinstallStartGPT ALL STAR$poetryrungpt-all-starEdit the team membersIf you want to change the team members, edit thegpt_all_star/agents.ymlfile.🔎 Examplesexamples
Package: gptask-cli
GPTaskGPTask is a command-line tool to leverage the power of GPT-4 to automatically format files according to specific prompts.InstallationDownload the package and install using pip:pipinstallgptask_cliUsageThe binary of the package isgptask. Here are some of the commands:To run the gptask on a specific file:gptask-pyour_promptfileyour_promptshould be a prompt stored in~/.gptask/prompts.To run the gptask on allfilesin a directory:gptask-pyour_promptexample/# Runs on /example/test.py, /example/test2.js, but NOT /example/sub/test.pyTo run the gptask on a glob pattern, just specify the pattern in double quotes:gptask-pyour_prompt"example/*.py"# Runs on /example/test.py but NOT /example/test2.js or /example/sub/test.pyTo run the gptask on all files in a directory recursively:gptask-r-pyour_promptexample/# Runs on /example/test.py, /example/test2.js, AND /example/sub/test.pyTo force execution even if some conditions are not met:gptask-f-pyour_promptfileIf a prompt doesn't exist, GPTask will display available prompts.For example:gptask-pnon_existent_promptexample.jsThis will output:Prompt non_existent_prompt not found
Available prompts:
  doc-reviewer
  your-prompt
  ...ContributionContributions are welcomed! Feel free to open an issue or create a pull request.Running in development: Run./scripts/test.shor alternatively run:rm-rfdist
poetrybuild
poetryinstall
python3-mpipinstall--force-reinstalldist/gptask_cli-*-py3-none-any.whlDeployment instructions:python3-mpipinstallhomebrew-pypi-poet
python3-mpipinstallgptask_cli
poet-fgptask_cli# Copy to ruby fileLicenseThis project is licensed under the MIT License.
Package: gpt-assistant-lib
GPT-Assistant LibraryThe GPT-Assistant Library is a Python-based toolkit for building intelligent personal assistants powered by OpenAI's GPT
models. This library simplifies the integration of conversational AI into your applications, making it easier than ever
to create chatbots, virtual assistants, and more.Key FeaturesSeamless integration with GPT-3 and GPT-4 models.Easily manage conversations and user interactions.Support multiuser chat history supportCustomizable and extensible to suit your specific needs.Developer-friendly API for smooth integration into your projects.Installationpipinstallgpt-assistant-libConfigurationTo set up the assistant, you need an API key and to create a system prompt.Obtain API keyGo to OpenaiwebsiteSystem promptIt will define your assistant behaviour.
More info you can find
indocumentationHistoryThe library maintains a conversation history that the assistant relies on to understand and maintain context during
interactions. This conversation history is included in every request sent to OpenAI. A larger history size allows
the assistant to remember more context, enhancing its ability to engage in meaningful conversations.
However, it's important to note that larger conversation histories can result in increased API call costs.Usageimportgpt_assistant_libopenai_api_key="your_openai_api_key"initial_prompt="You are a helpful assistant."max_history_size=5history_lifetime=600# 10 minutesassistant=gpt_assistant_lib.build_assistant(openai_api_key,initial_prompt,max_history_size,history_lifetime)whileTrue:user_input=input("You: ")assistant_response=assistant.exchange("any",user_input)print(f"Assistant:{assistant_response}")DevelopmentRun with enabled virtual environmentAutoformat source codetaskformatRun all linterstasklintRun unit teststasktestRun all linters and unit teststaskallLicenseThis project is licensed under the MIT License
Package: gpt-automation
GPT AutomationThis Python-based project provides a way to automatically generate a project structure, including all directories and files, while ignoring certain unwanted files or directories (as specified in a blacklist). It also provides the ability to generate file contents, and can copy either the entire project structure or just the directory structure to the clipboard.InstallationPipx InstallationWe recommend installing GPT Automation through pipx, which is a package manager for running applications written in Python. If you haven't installed pipx, first install it by running:python3-mpipinstall--userpipx
python3-mpipxensurepathNext, install the GPT Automation package with:pipxinstallgpt-automationManual InstallationTo install the project, run the following command from the project's root directory:python setup.py installThis will install the project as a package, making themainmodule accessible from the command line.InitializationTo initialize the .gpt directory with sample blacklist and whitelist files, run:autogpt initThis will create a .gpt directory if it doesn't already exist, and will copy sample_config/black_list.txt and sample_config/white_list.txt to the .gpt directory.Prompt GenerationGPT Automation provides two types of prompts:Full Prompt:This includes both the directory structure and the contents of all files. To generate a full prompt, use:autogpt prompt-allDirectory-Only Prompt:As the name suggests, this only includes the directory structure. To generate a directory-only prompt, use:autogpt prompt-dirIn both cases, the generated prompt is automatically copied to the clipboard.If you want to specify a different blacklist file, whitelist file, or project path, you can do so with the --black-list-file, --white-list-file, and --project-path options, respectivelyBlacklists and WhitelistsThe blacklist file is a list of patterns that will be ignored when generating the prompt. The whitelist file, on the other hand, is a list of patterns that will be included in the prompt. If a file matches a pattern in both the blacklist and the whitelist, it will be included.Sample contents for black_list.txt:Here are some sample contents for the black_list.txt and white_list.txt files to be used with the GPT Automation project:Sample contents for black_list.txt:*prompts*
*.idea*
*__pycache__*
*.xml
*.gitignore*
*.md
*gen_scripts/old*
*/resources*
*.tpl
*bazel-*
*examples*
*tests*
*scripts*
*dse*
*.gpt*Sample contents for white_list.txt:*.groovy
*.java
*.py
*.ini
*.txtOutputThe whole code will be coped to clipboard in this formatDirectoryStructure:./file_1.pyfile_2.pydir_1/file_1.pyFileContents:==========file_1.py:##.... code for file_1.py==========file_2.py:##.... code for file_2.py==========dir_1/file_1.py:##.... code for dir_1/file_1.py
Package: gptbase
🚀 GPTBaseWelcome to GPTBase! This Python library provides a straightforward and user-friendly interface to leverage OpenAI's powerful GPT-3.5-Turbo and GPT-4 models for text generation. 📚🔍✨ Features🎛️ Configurable parameters for chat completion.💬 Support for both individual prompts and chat conversations.⚡ Stream output option for faster response times.📝 Built-in logging and rich printing for enhanced visualization.🔄 Customizable model choice, including GPT-3.5-Turbo, GPT-4, and other variants.📈 Easy model parameter adjustment.🤖 Support for function calls in chat completions.📦 InstallationYou can easily install the GPTBase library from PyPI with a single command line:pipinstallgptbaseOnce installed, import it in your Python script:fromgptbase.basev2importChatAssistant,CompletionParameters,FunctionCall📚 UsageThe library includes two powerful classes:Assistantfor individual prompts andChatAssistantfor engaging, multi-turn chat conversations.Here's a snippet showcasing a simple usage of theChatAssistantclass:fromgptbase.basev2importChatAssistant,CompletionParameterscm=CompletionParameters(stream=True)assistant=ChatAssistant(memory_turns=3)message=assistant.chat("I want to learn Python",cm)And here's an example of how to use function calls:fromgptbase.basev2importAssistant,CompletionParameters,FunctionCall# Define the functionget_weather_function=FunctionCall("get_current_weather",{"location":"Boston"})# Define the functions that the model can callfunctions=[{"name":"get_current_weather","description":"Gets the current weather for a given location","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The location to get the weather for"}},"required":["location"]}}]# Define the parameters for the chat completionparams=CompletionParameters(model="gpt-3.5-turbo-0613",function_call=get_weather_function,functions=functions,# Add other parameters as needed)# Create an instance of the Assistant classassistant=Assistant()# Call the functionresponse=assistant.ask("What's the weather like in Boston?",params=params)# Print the responseprint(response)extract_function_call(response)defget_current_weather(location):"""fake get current weather function."""print(f"Today's fake weather for{location}is _°")func_dic={get_current_weather.__name__:get_current_weather}call_with_chat_completion(response,func_dic)And you will get output like this:Today's fake weather for Boston is _°You can also use the command line interface for chat conversations:gptbase-chat--memory-turns3--system-prompt"This is a system prompt."For more examples and a deeper dive into usage, please refer to the detailed documentation. 📘🙋 SupportIf you have any questions, run into any issues, or just need a little help, don't hesitate to reach out. We're here to help! 🤝Whether you're a veteran developer or just getting started, GPTBase is a powerful tool for any text generation task. Give it a try today! 🌟
Package: gptbatcher
GPTBatcherGPTBatcher is a Python package that allows you to run multiple GPT-3 completions in parallel. It is useful for running surveys, polls, or any other task that requires multiple completions. It returns a pandas data frame with the results.InstallationpipinstallgptbatcherUsagefromgptbatcherimportGPTBatcher,Question,Choice,Participantimportosbatcher=GPTBatcher(api_key=os.environ['OPENAI_API_KEY'],rpm=20)berlin=Choice(label="Berlin",prompt="Berlin")munich=Choice(label="Munich",prompt="Munich")hamburg=Choice(label="Hamburg",prompt="Hamburg")frankfurt=Choice(label="Frankfurt",prompt="Frankfurt")question=Question(label="Capital of Germany",prompt="What is the capital of Germany?",choices=[berlin,munich,hamburg,frankfurt])segmentA=Participant(label="Segment A",prompt="You are a 26 year old male from Birmingham, UK",weight=1)segmentB=Participant(label="Segment B",prompt="You are a 45 year old female from London, UK",weight=2)participants=[segmentA,segmentB]result=batcher.ask(question=question,participants=participants,samples=30)# result = pd.DataFrame([[10, 0, 0, 0], [20, 0, 0, 0]], columns=['Berlin', 'Munich', 'Hamburg', 'Frankfurt'], index=['Segment A', 'Segment B'])print(question)print(result.sum())# Berlin       30# Munich        0# Hamburg       0# Frankfurt     0Running the testspython-munittestdiscoverRunning the examplepython3-mexamples.soothsayerContributingPlease raise an issue if you find a bug or have a feature request. Pull requests are welcome.SupportCBM Digital offers support services for this package. Please contact us athttps://www.cbmdigital.co.uk/contact/, or by email atcontact@cbmdigital.co.ukLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: gpt-blazing
gpt-blazingThis project draws inspiration fromgpt-fastand applies the same performance optimization strategy to MORE models. Unlike gpt-fast, this project aims to be a “framework” or “library”.Installationpipinstall--pretorch==2.2.0.dev20231207--index-urlhttps://download.pytorch.org/whl/nightly/cu118
pipinstall--pregpt-blazingUsageDownload agpt-blazingconverted model.Original model👇👇gpt-blazingconverted model🤗baichuan-inc/Baichuan2-13B-Chat🤗gpt-blazing/baichuan2-13b-chatmore to be supported...Run the following demo.fromdatetimeimportdatetimefromgpt_blazing.engineimportEnginefromgpt_blazing.model.interfaceimportRolefromgpt_blazing.model.baichuan2.inferenceimport(Baichuan2ModelInferenceConfig,Baichuan2ModelInference,)init_dt_begin=datetime.now()engine=Engine(Baichuan2ModelInference(Baichuan2ModelInferenceConfig(model_folder='the path of model folder you just downloaded.',device='cuda:0',)))init_dt_end=datetime.now()print('init:',(init_dt_end-init_dt_begin).total_seconds())generate_dt_begin=datetime.now()response=engine.generate([(Role.USER,"帮我写一篇与A股主题相关的作文，800字左右")])generate_dt_end=datetime.now()generate_total_seconds=(generate_dt_end-generate_dt_begin).total_seconds()print('generate:',generate_total_seconds,response.num_tokens/generate_total_seconds)print(response.content)PerformanceGPU: 3090ModelTechniqueTokens/SecondBaichuan2 13bINT8(this project)50.1Baichuan2 13bINT8 (huggingface)7.9Llama2 13bINT8 (gpt-fast)55.5
Package: gpt-bot
gpt-botA GPT Command line interface bot.This is only for gpt-3.5-turbo currently.
You need to setOPENAI_API_KEYin environment variable.
And maybeOPENAI_PROXYis also useful if you need proxy.Usagepython -m gpt_botand enjoy.Command/multiline: toggle multiline input./prompt: changesystem contentduring chatting./rollback: rollback the last conversation./history: show chat history./edit: edit what bot said just now./record: use openai'swhisterto transcribe what you are saying./quit: quit.
Package: gptbots
gptbotsA simple Python package for creating and interacting with GPT-based chatbotsPreliminariesMake sure your OpenAI API key is setup (seeOpenAI's Quickstart tutorial).UsageTo create a chatbot:bot = gptbots.Chatbot()creates a chatbot instance with default attributesbot = gptbots.Chatbot(model, temperature, custom_instructions, chatbot_name)creates a chatbot instance with custom attributesTo chat:bot.chat(prompt)prints chatbot response to string promptSee more methods below.Attributesmodel: default is "gpt-3.5-turbo-1106"; seeOpenAI's documentation on modelsfor valid model namestemperature: default is 0.7; ranges from 0.0 to 1.0; higher generally means more creativecustom_instructions: default is "You are a helpful assistant."chatbot_name: default is "Assistant"context: contains custom instructions, user messages, and chatbot responsesMethodschat(prompt)prints chatbot response to string promptchat_image(prompt, url)prints chatbot response to string prompt + image URL when using "gpt-4-vision-preview" (aka GPT-4 Turbo with vision)save(file_path)saves chat history and settings to preferred fileload(file_path)loads chat history and settings from preferred fileprint_messages()prints context without custom instructions in a prettier formatprint_context()prints context in a prettier format
Package: gptchangelog
GPT ChangelogGPT Changelog is a tool to automatically generate a changelog using OpenAI's GPT-3 based on commit messages since the most recent tag. It will generate a changelog in Markdown format and prepend it to theCHANGELOG.mdfile.InstallationUsing pippip install gptchangelogConfigurationBefore using GPT Changelog, you need to create a configuration file named config.ini in the $HOME/.config/gptchangelog directory.[openai]
api_key = your_openai_api_key_hereReplace your_openai_api_key_here with your actual OpenAI API key.UsageTo generate a changelog and prepend it to the CHANGELOG.md file, navigate to your Git repository directory and run the following command:gptchangelogThe script will fetch commit messages since the most recent tag, determine the next version based on semantic versioning, generate a changelog using OpenAI's GPT-3, and prepend the changelog to the CHANGELOG.md file. If the CHANGELOG.md file does not exist, the script will create it.LicenseThis project is licensed under the MIT License.
Package: gpt-chatbot-cli
Chatgpt-cliIt's a very minimal cli prompt, where you can chat and keeping the conversation session memorable by chatgpt.InstallAssuming you created a env variable with key namedOPENAI_API_KEY.
If you don't have a api keyvisit hereand generate one.vim ~/.bashrc
exports OPENAI_API_KEY=<YOUR OPENAI API KEY>$ pip3 install gpt-chatbot-cliUsage$gpt-chatbot-cli--help

Usage:gpt-chatbot-cli[OPTIONS]ACLIforOpenAI'sGPT-3API.Chatwithabot,askquestions,correctgrammar,summarizetext,andmore.Examples:gpt-chatbot-cligpt-chatbot-cli--api_key=YOUR_API_KEYgpt-chatbot-cli--api_key=YOUR_API_KEY--model=text-davinci-003--temperature=0.7gpt-chatbot-cli-mgpt-4-t0.8-p"q&a"Options:-k,--api_keyTEXTOpenaiAPIkey.Ifnotprovided,willpromptforitorusetheenvironmentvariableOPENAI_API_KEY.-m,--modelTEXTModeltousefortextgeneration|(default:gpt-3.5-turbo)-t,--temperatureFLOATTemperaturefortextgeneration|(default:0.9)-p,--presetTEXTPresetmodetousefortextgeneration|(default:Chat)Availablepresets:Chat,Q&A,GrammarCorrection,Eli5,Custom-hs,--historyShowchathistorypicker|(default:False)-h,--helpShowthismessageandexit.Demo
Package: gpt-chat-mate
GPTChatMate v1.10.3A python cli front-end for the chatGPT API.InstallationNote: This app requiressqlite3version>3.35.0.pip install gpt-chat-mateConfigurationRunning the app for the first time will produce a.config.jsonfile locally with default config options.db_filename- the filename to use for the sqlite database.gpt_model- which GPT model to use for the chat.print_style- the pygments style to use for the GPT output.token_limit- the limit on the number oftokensthat the app will send in a single API call.
Note: the user will still be shown the full conversation history even if the token limits the conversation sent
to the API.openai_req_timeout- The OpenAI API request can sometimes hang for an insane amount of time, so this sets a timeout.
The default is 60.default_editor- The editor to use for things like editing an existing system prompt. The default isvim.editor_on_paste- Edit all multiline prompts using an editor instead of the command line. Defaults tofalsebecause it may not work on all systems.UsageInstall via pip, and run via the package name.gpt-chat-mateCommandschat optional[<ID>]- Start a new chat or continue an existing one by providing the ID.delete <ID>- Delete an existing chat.list,ls- List existing chats stored in the database.duplicate <ID>- duplicates a chat with just the system prompt. (Does not duplicate the whole chat)rename <ID> optional[<name>]- rename a chat. If<name>is not given, chatGPT is used to rename it.esp <ID>- (e)dit (s)ystem (p)rompt allows you to edit the system prompt of a chat. (This has only been tested on a unix system).help- List available commands.exit- Exit the program.Special Prompt Keywordspaste- You can use the paste command as a prompt to enter paste mode. Paste mode allows you to freely type or paste
many lines of text as a prompt. You then useEOFto indicate that you want to submit the prompt.