Saravanan666/pypi-org huggingface dataset:
Package: gptfunction
OverviewTheGPTFunctionPython module provides a decorator for wrapping Python functions to generate an OpenAI GPT function calling schema. This module is particularly useful for those who need to integrate Python functions with GPT in a structured and efficient manner. The decorator transforms a regular Python function into a GPT function with a JSON schema, which can then be utilized by GPT for various purposes.FeaturesType Hinting and Documentation: The module enforces type hinting for parameters, supporting types likestr,int,float,typing.Literal, and subclasses ofEnum.Docstring Parsing: It parses the function's docstring to extract descriptions, ensuring a detailed and clear schema.Automatic Schema Generation: Generates the necessary schema for GPT integration seamlessly.InstallationpipinstallgptfunctionUsageBasic Examplefromgptfunctionimportgptfunction@gptfunctiondefoutput_user(name:str,age:int)->None:"""Outputs a user's name and age to the console.:param name: The name of the user.:param age: The age of the user."""print(f"Name:{name}, Age:{age}")gpt_tools=[output_user.schema()]Advanced Usage with Enums and LiteralsfromgptfunctionimportgptfunctionfromenumimportEnumfromtypingimportLiteralclassFruit(Enum):APPLE='apple'BANANA='banana'@gptfunctiondeffavorite_fruit(user_name:str,fruit:Fruit,quantity:Literal[1,2,3])->str:"""Returns a string stating the user's favorite fruit and quantity.:param user_name: Name of the user.:param fruit: The preferred fruit.:param quantity: The quantity preferred (1, 2, or 3).:return: A descriptive string."""returnf"{user_name}likes{quantity}{fruit.value}(s)."print(favorite_fruit.schema())DocumentationParameter Typesstr: For string values.int: For integer values.float: For floating-point values.typing.Literal: For specifying a literal set of values.Enum: For enumerated types, with string values as Enum members.Decorator@gptfunction: This decorator should be used above the function definition. It processes the function and creates a GPT function schema.Methodsschema(): Returns the JSON schema of the wrapped function.description(): Retrieves the function's description from its docstring.name(): Returns the name of the function.ContributingContributions to improveGPTFunctionare welcome. Please follow the standard procedures for submitting issues and pull requests on the project's GitHub repository.LicenseDistributed under the MIT License. SeeLICENSEfor more information.
Package: gpt-ghostwriter
__________  ______
  / ____/ __ \/_  __/
 / / __/ /_/ / / /   
/ /_/ / ____/ / /    
\____/_/     /_/     
                     
   ________  ______  ____________       ______  ____________________ 
  / ____/ / / / __ \/ ___/_  __/ |     / / __ \/  _/_  __/ ____/ __ \
 / / __/ /_/ / / / /\__ \ / /  | | /| / / /_/ // /  / / / __/ / /_/ /
/ /_/ / __  / /_/ /___/ // /   | |/ |/ / _, _// /  / / / /___/ _, _/ 
\____/_/ /_/\____//____//_/    |__/|__/_/ |_/___/ /_/ /_____/_/ |_|OverviewThis uses OpenAI's GPT LLM to write git commit summariesSetupexport OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxUsagegit commit -m "$(ghostwriter)"Example$ echo "test" > test.txt"
  $ git add test.txt
  $ ghostwriter
  "Adds a test.txt file to repo"
Package: gptimpl
GPTImplAsk ChatGPT to implement your Python functions for you.InstallationA distribution is available on PyPI.pipinstallgptimplUsageSince we interact with OpenAI, the OpenAI API key
is a run-time dependency forgptimpl. You can either provide it per-invocation, i.e.OPENAI_API_KEY="<key>"gptimpl-vexample.pyor you can export it before running anygptimplcommands with:exportOPENAI_API_KEY="<key>"gptimpl--helpusage: gptimpl [-h] [-v] [-w] [-m MODEL] FILE [FILE ...]

Generate implementations for Python functions based on docstrings and function signature using OpenAI.

positional arguments:
  FILE                  The Python files to process.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Specify the verbosity of the output.
  -w, --overwrite       If specified, the generated files will be overwritten instead of logging to stdout.
  -m MODEL, --model MODEL
                        Select the backend model to use. Defaults to gpt-3.5-turboDISCLAIMER: Please use the-wflag only if you want to overwrite your source files and they are already version controlled!
The GPT generated code can be garbage sometimes so it is recommended to overwrite only if you have a way to revert the changes.Updating the function body in-placeSuppose you have a Python file calledexample.pythat contains unimplemented functions as follows:deffibonacci(n:int)->int:"""Return the n-th fibonacci number."""defestimate_pi(n:int)->float:"""Estimate Pi using Gregory-Leibniz seriesusing the first n terms."""Then we can pass this file throughgptimplto generate the implementations for us.Note: Without--overwrite, it defaults to printing the replacement contents to stdout.gptimplexample.py-v--overwriteThis overwrites the file with the following patch:-def fibonacci(n: int) -> int:+def fibonacci(n: int) ->int:"""Return the nth fibonacci number."""+    if n <= 1:+        return n+    else:+        return fibonacci(n - 1) + fibonacci(n - 2)-def estimate_pi(n: int) -> float:+def estimate_pi(n: int) ->float:"""Estimate Pi using Gregory-Leibniz seriesusing the first n terms."""+    pi = 0+    for i in range(n):+        pi += (-1) ** i / (2 * i + 1)+    return pi * 4resulting in anexample.pythat looks like:deffibonacci(n:int)->int:"""Return the nth fibonacci number."""ifn<=1:returnnelse:returnfibonacci(n-1)+fibonacci(n-2)defestimate_pi(n:int)->float:"""Estimate Pi using Gregory-Leibniz seriesusing the first n terms."""pi=0foriinrange(n):pi+=(-1)**i/(2*i+1)returnpi*4
Package: gpt-magic
GPT magicA Jupyter/IPython magic command for generating code using GPTExampleGenerating code with GPT by loading the extension and prefixing your line with%gpt.InstallInstall with pippipinstallgpt-magicPlease note that users will need to provide their own OpenAI API key. Set an environment variable calledOPEN_AI_KEYwith your key. Or pass the API key when loading the extension, by running the following line before %load_ext gpt_magic:importosos.environ["OPENAI_API_KEY"]="your_openai_api_key_here"Usage%load_extgpt%gpt"Your request here"ModelThe current default is the gpt-3-turbo model, but can be changed usingOPENAI_MODELenvironmental variable.Using GPT-4 exampleimportosos.environ["OPENAI_MODEL"]="gpt-4"ArgumentsChatYou can enable memory of all previous requests and responses with the-cargument. By default it's memory-less.%gpt-c"Write a function which calculates the average of a numpy array"TemperatureYou can set the temperature with-targument. The default is 0.%gpt-t0.5"Write a function which calculates the average of a numpy array"
Package: gpt-manifold
gpt-manifoldAn assistant for betting on prediction markets onmanifold.markets, utilizing OpenAI's GPT APIs.Runpip install gpt_manifoldpython -m gpt_manifoldThe assistant will display a list of markets and guide you through the process of placing bets.FeaturesDisplay interactive list of markets and market informationGenerateYES,NOorABSTAINprediction using selected model (gpt-4,gpt-3.5-turbo)Use maximum amount of mana specified by userPost comment explaining reasoning (please don't abuse this!)
Package: gpt-me
GPT-meAn experiment to replicate a fully self-sufficient, human-like chatbot that imitates you using various artificial intelligence models.IdeaThis is the order of steps for how I envision GPT-me functioning.Semantic MemoriesMemories are still needed for AI self-replication. Unfortunately, large memory file summarization is a huge source of token consumption. One that poor developers like myself cannot afford.Document Memories (deprecated)In order to replicate yourself using AI, memories are needed. In the case of GPT-me, memories would be provided in the form of summarized transcripts of past messages.
The filescripts/memory.pywill be used to summarize a transcript using a version ofBARTfine tuned on thesamsumdataset. The fine tuned model byphilschmidis found on HuggingFace atphilschmid/distilbart-cnn-12-6-samsum.The transcript will be split into several line chunks by the preprocessor, then those chunks will be summarized by BART.
This process is recursive, and will eventually only store the key details of a person in a small summary of their personality.The general recursive summary idea was mildly inherited from OpenAI's work onSummarizing books with human feedback, but using a dedicated summary transformer instead of GPT-3.ChattingGPT-me receives a message from some chat app (many adapters should exist eventually), this can contain text, links, images, anything.The inputted message is processed and complex elements are simplified. Given links, they content will be crawled and summarized through a route similar to memories. Images should be described by some captioning model (ex.nlpconnect/vit-gpt2-image-captioning).All provided summary content, along with memories, are passed into a complex gpt-3.5-turbo prompt, which will then carry out the conversation. This prompt will also include a sample of the user's writing style, as to try and emulate that.The generated individual response is sent through the chat app adapter.The generated response will be saved, as well as up to (roughly) 10 full exchanges of messages from either side. This maintains and thinks only about the most current information.After an indeterminate period of time or number of messages, a new memories set will be automatically rebuilt and the process continues.---
title: Exhaustive Single Message Flow
---
flowchart LR
    Input["Adapter Input"] --> Message
    Message --> Text & Images & Links
    Text --> Sem["Semantic Memory"] & DuckDuckGo
    DuckDuckGo --> Web["Web Text Crawler"]
    Images --> Captioner & OCR
    %% OCR --> Sem
    Links --> Web
    Sem & Captioner & Web & OCR & Text --> ChatGPT
    ChatGPT --> Output["Adapter Output"]TodoSemantic memory question generation. (ex."Peter hit me with a paper today."->["Who is Peter?", "What happened today?"])Integrate web search summaries.Adapter example.Add image captioner.System to modify message into proper style.
Package: gpt-muti-gen
gpt-muti-genEnglish|中文chatgpt generate article, and auto import to wordpress blog system.Usagewindows binary version1、new title.txt configuration file, input some question into one by one.2、config.json input key，apkkey and so on.3、double click main.exe and start it.pip version1、new title.txt configuration file, input some question into one by one.2、config.json input key，apkkey value and so on.3、download and install python3 software.4、run the command：pip install gpt-muti-gen
gpt-muti-genrefrenceuse Chatgpt generate articleissuesLicenseLicensed under theApache 2.0©liuyuqi.gov@msn.cn
Package: gp-toolkit
gp-toolkitgp-toolkit aims to be a batteries-included framework forRather than a feature-complete Gaussian process library in and of itself,
it aims to fills specific gaps left by popular frameworks like GPFlow, GPyTorch,
TensorFlow Probability, and others.aimed at power users, in particular, researchers and developers looking to
experiment with cutting-edge methods from the latest from the Gaussian process
research community.Various extensions and mods for GPflow < 2.6.0Free software: MIT licenseDocumentation:https://gp-toolkit.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2023-01-14)First release on PyPI.
Package: gptools
Gaussian processes with arbitrary derivative constraints and predictions.gptoolsis a Python package that provides a convenient, powerful and extensible implementation of Gaussian process regression (GPR). Central togptool’s implementation is support for derivatives and their variances. Furthermore, the implementation supports the incorporation of arbitrary linearly transformed quantities into the GP.Developed and tested using Python 2.7 and scipy 0.14.0. May work with other versions, but it has not been tested under such configurations.Full package documentation is located athttp://gptools.readthedocs.org/A printable PDF is available athttps://media.readthedocs.org/pdf/gptools/latest/gptools.pdfReleases are available in PyPI athttps://pypi.python.org/pypi/gptools/To install, simply execute:pip install gptools(You must already have NumPy and Cython installed for this to work.)If you find this software useful, please be sure to cite it:M.A. Chilenski et al. 2015 Nucl. Fusion 55 023012http://stacks.iop.org/0029-5515/55/023012
Package: gptop
GPT OperatorEnhance your GPT applications with external operationsGPT Operator (gptop) serves as acall operatorfor your application. Simply providegptopwith a prompt, and it will determine the required external operation to fulfill the prompt and, if desired, execute that operation on your behalf.FeaturesExecute operations based on a given promptCreate, update, and remove operations in vector databaseRequirementsPinecone Vector Database IndexOpenAI access to gpt-4InstallationInstall the released version via pip:$pipinstallgptop[WARNING] The package is currently in Alpha stage, so please exercise caution before using it in production.Repository SetupIf you don’t have Python installed,download it here.Clone this repository.Navigate to the project directory:$cdgpt-operatorCreate a new virtual environment:$virtualenvvirt
$sourcevirt/bin/activateInstall the requirements:$pipinstall-rrequirements.txtMake a copy of the example environment variables file:$cp.env.example.envAdd yourOpenAI API keyto the newly created.envfile.Add yourPinecone API key and Regionto the newly created.envfile.CLIRun the application:$./run.shTo set up an operation on your machine, please see theexample.ContributingWe are actively looking for new contributors to help improve and expand the GPT Operator repository. All contributions are welcome! Please feel free to reach out for more information on how you can contribute.
Package: gpt-pdf-md
gpt_pdf_mdgpt_pdf_mdis a Python package that leverages GPT-4V and other tools to convert PDF files into Markdown. The current limitation of raw GPT-4V is that it does not support PDF documents in the API. Additionally, when prompted to convert text containing figures to Markdown, the figures are not converted correctly due to missing image URLs in the Markdown. However,gpt_pdf_mdis coming close to the OCR quality of Mathpix!FeaturesExtracts figures from PDF files using thepdffigures2Scala library.Converts PDF pages to images and uploads them to a Google Cloud Bucket.Utilizes GPT-4V Vision to generate Markdown content from a PDF and then inserts image URLs into the Markdown.Additional DependenciesThis package requires thepdffigures2Scala library to extract figures from PDF files. You need to have all necessary dependencies installed for the library. You can find more informationhere. Please note that this can be quite a hassle because parts of the library are written in Scala, so you need to have the correct versions of Java and Scala installed. We are looking for an alternative, more straightforward way to extract images from a PDF. If you have any ideas, feel free to open anissue.InstallationOnce you havepdffigures2set up, you can installgpt_pdf_mdvia pip:pipinstallgpt-pdf-mdConfigure the required environment variables in your.envfile without spaces or unnecessary quotes:OPENAI_API_KEY=open_ai_key
GOOGLE_ID=google_project_id
GOOGLE_BUCKET=google_bucket_nameNOTE: This project requires a public Google bucket where the images, which are later rendered in the Markdown, are uploaded.UsageTo process a PDF and generate Markdown content, it's important that the Python file is in the same directory as thepdffigures2folder. You can usegpt_pdf_mdas follows:fromgpt_pdf_md.readerimportprocess_pdfimportosfromdotenvimportload_dotenvload_dotenv()OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')GOOGLE_ID=os.getenv('GOOGLE_ID')GOOGLE_BUCKET=os.getenv('GOOGLE_BUCKET')absolute_path=os.path.dirname(os.path.abspath(__file__))# Absolute path to the PDF filePDF=absolute_path+"/example.pdf"# Absolute path to pdffigures2PDFFIGURES2_PATH=absolute_path+"/pdffigures2/"process_pdf(PDF,PDFFIGURES2_PATH,OPENAI_API_KEY,GOOGLE_ID,GOOGLE_BUCKET)This will process the specified PDF and output a Markdown file with the extracted information in the same directory. An example is theoutput.mdfile, which is the converted result ofexample.pdfcreated by running theexample.pyscript.Next StepsTry Rustvortexfor PDF image extractionUse GPT-4 128k for final formatting of MarkdownCreate a clearer README to make it easier for everyone to use the Python packageImprove error handlingContributing & SupportWe welcome contributions! Please open an issue or submit a pull request on our GitHub repository.LicenseThis project is licensed under the terms of theMIT License.
Package: gpt-pdf-reader
GPT PDF ReaderGPT PDF Reader is a Python package that utilizes GPT-4V and other tools to extract and process information from PDF files.FeaturesExtracts figures from PDF files using thepdffigures2Scala library.Converts PDF pages to images and uploads them to Google Cloud Bucket.Utilizes GPT-4V Vision to generate Markdown content from pdf an than inserts image urls into markdown.InstallationThe installation process requires Java and Scala. The following instructions are for macOS users:brewtapAdoptOpenJDK/openjdk
brewinstall--caskadoptopenjdk11
brewinstalljenvecho'export PATH="$HOME/.jenv/bin:$PATH"'>>~/.zshrcecho'eval "$(jenv init -)"'>>~/.zshrcAfter updating your shell configuration, close and reopen your terminal, then set Java 11 as the global version using jenv:jenvadd/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/
jenvglobal11.0.11Install GPT PDF Reader via pip:pipinstallgptpdfreaderConfigure the required environment variables in your .env file without spaces or unnecessary quotes:OPENAI_API_KEY=open_ai_key
GOOGLE_ID=google_project_id
GOOGLE_BUCKET=google_bucket_nameUsageTo process a PDF and generate Markdown content:fromgptpdfreader.readerimportmainmain('path_to_your_pdf.pdf')This will process the specified PDF and output a Markdown file with the extracted information in the same directory.Limitationssome limitationsContributingWe welcome contributions! Please open an issue or submit a pull request on our GitHub repository.SupportFor questions and support, please open an issue in the GitHub issue tracker.License
Package: gpt-playground
GPT playgroundJust me playing with large language models, langchain, etc.gptmeAn interactive CLI to let you interact with LLMs in a Chat-style interface.Withfeatureslike:Supports OpenAI andany model that runs in llamaThanks to llama-cpp-server!ToolsAccess to the local machineExecute shell/Python code on the local machine.Command output (stdout & stderr + error code) will be feeded back to the agent, making it able to self-correct errors etc.Can handle long context sizes through summarization.(not very well developed)UsageInstall deps:poetryinstallTo use locally, you need to start llama-cpp-server:poetryrunpython-mllama_cpp.server--model~/ML/Manticore-13B.ggmlv3.q4_1.binThen you can interact with it using:gptme--llmllamaTODOIdeas for things to try:An agent that looks up the latest CI job, and if it failed, tries to figure out how to fix it.An agent that looks up recent GitHub issues, tries to generate an answer.An agent that looks up recent GitHub PRs, tries to generate an action (comment, ask for human review, merge, close).
Package: gptplus
GPT-4 Turbo is a cutting-edge language model developed by OpenAI, now available for free access through web engineering advancements. With the latest innovation in XEROFANIC-ATTACH tunneling technology, GPT-4 Turbo effortlessly establishes secure connections to users' requests, granting them unparalleled access to its powerful capabilities.gptplusgptplus is a Python wrapper for the GPT-4 Plus API.Installationpip install gptplusUsagefromgptplusimportChatGPTchatgpt=ChatGPT()chat_id=chatgpt.create_chat()response=chatgpt.send_message(chat_id,"What is the capital of France?")print(response)chatgpt.delete_chat(chat_id)API ReferenceChatGPTchatgpt=ChatGPT()Creates a new ChatGPT instance.create_chat()chat_id=chatgpt.create_chat()Creates a new chat and returns the chat ID.delete_chat(chat_id)chatgpt.delete_chat(chat_id)Deletes the chat with the given ID.get_chats()chats=chatgpt.get_chats()Returns a list of all chats for the user.get_chat(chat_id)chat=chatgpt.get_chat(chat_id)Returns the chat with the given ID.send_message(chat_id, message)response=chatgpt.send_message(chat_id,"What is the capital of France?")Sends a message to the chat with the given ID and returns the response.
Package: gpt-po-translator
Python GPT-4 PO File TranslatorThis Python script provides a convenient tool for translating.pofiles using OpenAI's GPT-4 model. It is designed to handle both bulk and individual translation modes, making it suitable for a wide range of project sizes and.pofile structures.FeaturesBulk Translation Mode: Enhances efficiency by facilitating the translation of multiple text entries simultaneously.Individual Translation Mode: Offers the flexibility to translate entries one at a time for greater precision.Configurable Batch Size: Allows users to set the number of entries to be translated in each batch during bulk translation.Comprehensive Logging: Logs detailed information for progress monitoring and debugging purposes.Fuzzy Entry Exclusion: Enables the option to omit 'fuzzy' entries from translation in.pofiles.Flexible API Key Configuration: Supports providing the OpenAI API key either through command-line arguments or a.envfile.RequirementsPython 3.xpoliblibraryopenaiPython packageAPI Key ConfigurationThegpt-po-translatorsupports two methods for providing OpenAI API credentials:Environment Variable: Set your OpenAI API key as an environment variable namedOPENAI_API_KEY. This method is recommended for security and ease of API key management.exportOPENAI_API_KEY='your_api_key_here'Command-Line Argument: Pass the API key as a command-line argument using the--api_keyoption.gpt-po-translator--folder./locales--langde,fr--api_key'your_api_key_here'--bulk--bulksize100--folder-languageEnsure your API key is kept secure and not exposed in shared or public spaces.InstallationVia PyPIInstall thegpt-po-translatorpackage directly from PyPI:pipinstallgpt-po-translatorManual InstallationFor manual installation or to work with the latest code from the repository:Clone the repository:gitclone[repositoryURL]Navigate to the cloned directory and install the package:pipinstall.UsageUsegpt-po-translatoras a command-line tool:gpt-po-translator --folder [path_to_po_files] --lang [language_codes] [--api_key [your_openai_api_key]] [--fuzzy] [--bulk] [--bulksize [batch_size]] [--folder-language]Examplegpt-po-translator --folder ./locales --lang de,fr --api_key 'your_api_key_here' --bulk --bulksize 100 --folder-languageThis command translates.pofiles in the./localesfolder to German and French, using the provided OpenAI API key, and processes 100 translations per batch in bulk mode.LoggingThe script logs detailed information about the files being processed, the number of translations, and batch details in bulk mode.LicenseMIT
Package: gpt-prive
Project and PyPI Packagehttps://pypi.org/project/gpt-prive/https://github.com/gpt-privehttps://huggingface.co/SlowbloodRequired Dependenciesbuild, twineBuildUpdatesrc/*and updatesetup.confBuilds todist/directorypython -m buildPush to PyPi with twinepython -m twine upload --repository pypi dist/*SetupCreate API key in PyPI accountAdd to~/.pypirc[distutils]
index-servers =
    pypi
    testpypi

[pypi]
  username = __token__
  password = pypi-AgszLCJ-Cut-And-P@aste-The-API-K#y-From-Your-AccountlZ7-mow

[testpypi]
repository = https://test.pypi.org/legacy/