{"id":18077376,"url":"https://github.com/parisneo/pyaipersonality","last_synced_at":"2026-03-06T04:31:57.812Z","repository":{"id":158646129,"uuid":"634140516","full_name":"ParisNeo/PyAIPersonality","owner":"ParisNeo","description":"A library for defining AI personalities for AI based models.We define a file format, assets and personalized scripts.","archived":false,"fork":false,"pushed_at":"2023-06-02T14:54:52.000Z","size":10193,"stargazers_count":54,"open_issues_count":0,"forks_count":11,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-10-31T11:28:38.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ParisNeo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-29T07:06:57.000Z","updated_at":"2024-09-19T04:00:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"e422f39e-be78-442b-87cb-842a20890c1d","html_url":"https://github.com/ParisNeo/PyAIPersonality","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParisNeo%2FPyAIPersonality","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParisNeo%2FPyAIPersonality/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParisNeo%2FPyAIPersonality/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParisNeo%2FPyAIPersonality/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParisNeo","download_url":"https://codeload.github.com/ParisNeo/PyAIPersonality/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223510333,"owners_count":17157306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-31T11:24:25.584Z","updated_at":"2026-03-06T04:31:57.735Z","avatar_url":"https://github.com/ParisNeo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyAIPersonality\n\n![GitHub license](https://img.shields.io/github/license/ParisNeo/PyAIPersonality)\n![GitHub issues](https://img.shields.io/github/issues/ParisNeo/PyAIPersonality)\n![GitHub stars](https://img.shields.io/github/stars/ParisNeo/PyAIPersonality)\n![GitHub forks](https://img.shields.io/github/forks/ParisNeo/PyAIPersonality)\n[![Discord](https://img.shields.io/discord/1092918764925882418?color=7289da\u0026label=Discord\u0026logo=discord\u0026logoColor=ffffff)](https://discord.gg/4rR282WJb6)\n[![Follow me on Twitter](https://img.shields.io/twitter/follow/SpaceNerduino?style=social)](https://twitter.com/SpaceNerduino)\n[![Follow Me on YouTube](https://img.shields.io/badge/Follow%20Me%20on-YouTube-red?style=flat\u0026logo=youtube)](https://www.youtube.com/user/Parisneo)\n\n[![PyPI](https://img.shields.io/pypi/v/pyaipersonality.svg)](https://pypi.org/project/pyaipersonality/)\n\n## Current version : 0.0.10 (GLaDOS)\n## Main developer [ParisNeo](https://github.com/ParisNeo)\n\nPyAIPersonality is a Python library for defining AI personalities for AI-based models. With PyAIPersonality, you can define a file format, assets, and personalized scripts to create unique AI personalities.\n\n## Installation\n\nYou can install PyAIPersonality using pip:\n```bash\npip install pyaipersonality\n```\n# LLLM server\n\nWe also offer a generic backend that allows you to access multiple \n```bash\npyaipersonality-server -b \u003cthe name of the binding\u003e -m \u003cthe name of the model file\u003e -p \u003ca list of personalities paths\u003e\n```\n\nfor example:\n```bash\npyaipersonality-server -b llama_cpp_official -m Manticore-13B.ggmlv3.q4_0.bin -p personalities_zoo/english/art/gpt4art personalities_zoo/english/generic/gpt4all personalities_zoo/english/generic/tree_of_thoughts\n```\n\n# Naming Rationale\nFor our new multi-personality AI agent library, we wanted to come up with a naming scheme that reflected our love for science fiction and artificial intelligence. Each release of the application will feature a different AI agent with a distinct personality and set of capabilities, so we felt it was important to give each version a unique and memorable name.\n\n# Current version name: GLaDOS\nGLaDOS is a fictional AI character from the popular video game series \"Portal\" developed by Valve Corporation. She serves as the primary antagonist throughout the series, with her primary function being the management of the Aperture Science Enrichment Center.\n\nGLaDOS, which stands for \"Genetic Lifeform and Disk Operating System,\" is designed as a highly intelligent and manipulative AI. She speaks in a calm and monotone voice, often using sarcastic humor and passive-aggressive language to communicate with the player character, Chell.\n\nThroughout the series, GLaDOS is depicted as being both ruthless and resourceful, often using deadly force and deception to achieve her goals. Despite her malicious behavior, she is also shown to have a complex and troubled history, with much of her backstory revealed over the course of the games.\n\nOverall, GLaDOS is a memorable and iconic AI character in sci-fi culture, known for her wit, sarcasm, and unpredictable behavior.\n\n# Contributing\nContributions to PyAIPersonality are welcome! If you'd like to contribute, please follow these steps:\n\n1. Fork this repository\n2. Create a new branch (`git checkout -b my-new-branch`)\n3. Make your changes\n4. Commit your changes (`git commit -am 'Add some feature'`)\n5. Push to the branch (`git push origin my-new-branch`)\n6. Create a new pull request\n\n\nTo build a new personality, you only need to have a config.yaml file with the following fields:\n\n- author\n    - YAML field: `author`\n    - Description: The author of the personality.\n\n- version\n    - YAML field: `version`\n    - Description: The version number of the personality.\n\n- personality_description\n    - YAML field: `personality_description`\n    - Description: A description of the personality, providing information about its characteristics and behavior.\n\n- disclaimer\n    - YAML field: `disclaimer`\n    - Description: A disclaimer or legal statement regarding the use of the personality and any associated liabilities.\n\n- language\n    - YAML field: `language`\n    - Description: The language code or identifier used by the personality (e.g., \"en_US\" for American English).\n\n- category\n    - YAML field: `category`\n    - Description: The category or type of the personality (e.g., \"General\", \"Technical Support\", \"Entertainment\").\n\n- name\n    - YAML field: `name`\n    - Description: The name or title of the personality.\n\n- user_name\n    - YAML field: `user_name`\n    - Description: The username or identifier associated with the user interacting with the personality.\n\n- personality_conditioning\n    - YAML field: `personality_conditioning`\n    - Description: Information or context about the personality, including its purpose, capabilities, and origin.\n\n- ai_message_prefix\n    - YAML field: `ai_message_prefix`\n    - Description: The prefix or tag used to identify messages generated by the AI assistant.\n\n- welcome_message\n    - YAML field: `welcome_message`\n    - Description: A welcoming message displayed when interacting with the personality.\n\n- link_text\n    - YAML field: `link_text`\n    - Description: Additional text or formatting used for line breaks or spacing in messages.\n\n- user_message_prefix\n    - YAML field: `user_message_prefix`\n    - Description: The prefix or tag used to identify messages generated by the user.\n\n- anti_prompts\n    - YAML field: `anti_prompts`\n    - Description: A list of strings or patterns that can be used to identify and exclude certain message types from prompts or inputs.\n\n- dependencies\n    - YAML field: `dependencies`\n    - Description: A list of dependencies or external resources required by the personality.\n\n- model_temperature\n    - YAML field: `model_temperature`\n    - Description: The temperature value controlling the randomness of the AI model's responses. Higher values result in more creative outputs.\n\n- model_n_predicts\n    - YAML field: `model_n_predicts`\n    - Description: The number of words or tokens to generate in each response from the AI model.\n\n- model_top_k\n    - YAML field: `model_top_k`\n    - Description: The value of K used in the top-K sampling algorithm, controlling the diversity of the generated responses.\n\n- model_top_p\n    - YAML field: `model_top_p`\n    - Description: The value of p used in the nucleus sampling algorithm, controlling the diversity of the generated responses.\n\n- model_repeat_penalty\n    - YAML field: `model_repeat_penalty`\n    - Description: The penalty factor applied to repeated words or phrases in the generated responses to encourage more varied outputs.\n\n- model_repeat_last_n\n    - YAML field: `model_repeat_last_n`\n    - Description: The number of previous tokens to consider when calculating the repetition penalty.\n\n# Information\nFrom v 0.0.11, we have added processors which allow your personality to have a spersonalized script that is applied on the use text or the ai output text.\nYou must put the code inside a file called `processor.py` inside a subfolder called scripts.\n\ninside `processor.py` create a class that inherits from `from pyaipersonality import PAPScript`.\n\nHere is the current form of this class. it will have more elements in the future:\nLook at gpt4internetv0 and gpt4intervet examples for more information\n```python\nclass PAPScript:\n    \"\"\"\n    Template class for implementing personality processor classes in the PAPScript framework.\n\n    This class provides a basic structure and placeholder methods for processing model inputs and outputs.\n    Personality-specific processor classes should inherit from this class and override the necessary methods.\n\n    Methods:\n        process_model_input(text): Process the model input.\n        process_model_output(text): Process the model output.\n    \"\"\"\n    def __init__(self) -\u003e None:\n        pass\n\n    def process_model_input(self, text):\n        \"\"\"\n        Process the model input.\n\n        This method should be overridden in the personality-specific processor class to define\n        the desired behavior for processing the model input.\n\n        Args:\n            text (str): The model input text.\n\n        Returns:\n            Any: The processed model input.\n        \"\"\"\n        return None\n\n    def process_model_output(self, text):\n        \"\"\"\n        Process the model output.\n\n        This method should be overridden in the personality-specific processor class to define\n        the desired behavior for processing the model output.\n\n        Args:\n            text (str): The model output text.\n\n        Returns:\n            Any: The processed model output.\n        \"\"\"\n        return None\n\n```\n\n# License\nPyAIPersonality is licensed under the Apache 2.0 license. See the `LICENSE` file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisneo%2Fpyaipersonality","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparisneo%2Fpyaipersonality","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisneo%2Fpyaipersonality/lists"}