معرفی شرکت ها


citoplasm-0.0.5


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

CITOplasm is a Python library for writing LLM code in a declarative way.
ویژگی مقدار
سیستم عامل -
نام فایل citoplasm-0.0.5
نام citoplasm
نسخه کتابخانه 0.0.5
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده Joshua Maxwell Pollock <jopo@mit.edu>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/citoplasm/
مجوز -
# CITOplasm CITOplasm is a Python library for writing LLM code in a declarative way. Our aim is to eliminate the need to write complicated prompts, templates, and recipes. Instead, we enable people to write compositional programs using base calls to LLMs (CITOs) and normal Python loops, functions, and conditionals. At the heart of CITOplasm is `createCITO`, a function that creates a CITO prompt. CITO stands for `(context, input) -> (thought, output)`. (It's a variation of CQRA.) On top of base CITO, we have ready-to-use functions that are broadly useful. These currently include `ask`, `chain`, `compare`, and `verify`. Our future goals include: - JavaScript/TypeScript support - more functions - more robust CITO - transparent prompt engineering optimizations, perhaps using LMQL - fleshing out `agent` and `context` concepts ## How to run To run: ``` python3.10 -m venv venv source venv/bin/activate pip install -r requirements.txt ``` Run tests (call from top-level) ``` pytest ``` ## How to publish https://packaging.python.org/en/latest/tutorials/packaging-projects/ ## Motivation and Inspiration This library builds on ICE: https://github.com/oughtinc/ice Have you ever wondered what it would be like to program with an LLM? Not like use an LLM to produce traditional code, but to actually program in a language that had LLM primitives? That's what this repo is exploring. Currently there are two approaches to this. First, we have very high-level tools like LangChain, which exposes monolithic chains that are hard to customize. We want to be able to easily create patterns like debate, amplify, verify, chain-of-thought, etc. from first principles so that we can explore and optimize these kinds of structures more easily. The second approach is adopted by ICE, which is to expose a very low-level API of prompt templates. This is expressive enough to get the job done, but writing string templates is really unstructured and mixes up prompt engineering concerns (*how* to write your prompt, i.e. prompt engineering) with domain-specific concerns (*what* to put in your prompt). LangChain also uses prompt templates for extensibility. Our approach is different. Instead of using prompt templates and recipes, we hide these away beneath a core set of primitives that abstract over single chat instances with an LLM. Our goal is for nearly all common LLM+tool patterns that exist today to be representable using a combination of our primitives and normal Python code without the need for writing prompts or recipes directly. Of course, we still want it to be possible for end-users to create their own primitives using prompts and recipes if they want, but we should be able to reduce the need for this. The primitives we have so far are: - **ask** Q&A format - **chat:** back-and-forth conversations (possibly multiple) with other agents and humans - **classify** to assign a category to a given input (match) - **approx-equal and approx-cmp** (uses classify) Some additional primitives we're thinking about or working on are: - **decompose** to break apart an input into smaller pieces (destructure) - can this be used to implement CoT? - **enumerate** to list elements of a collection (generator) - **translate/transform** - **summarize/reduce** - **filter/extract/parse/regex** - **complete** We are experimenting with whether these primitives can be designed as drop-in replacements for typical programming constructs. For example, can classify replace match? can approx-equal replace equal? can summarize replace reduce? This might give us an easy way to translate rigid programs to flexible, approximate ones. Or even more precisely, might make it really easy to switch some parts of a program to be rigid and other parts to be flexible/approximate. It might help us better organize our primitives and search for missing ones. It might also help us figure out which LLM interactions present truly novel primitives and which ones are "merely" approximate versions of existing primitives. ## Observations Context-Question -> Reasoning-Answer seems to be a robust pattern across Q&A, chat, classify, equality/comparison. It probably has a name. It's used in the selection-inference paper. CQRA? Decompose seems to overlap with the reasoning part of Q&A (thinking step by step is a form of decomposition). There are tradeoffs in terms of number of LLM calls (and maybe that also means tradeoffs in accuracy). tool selection, multiple choice QA, sub-agent calls can all be built on classify


نیازمندی

مقدار نام
- anyio==3.6.2
- attrs==22.2.0
- black==23.3.0
- certifi==2022.12.7
- charset-normalizer==3.1.0
- click==8.1.3
- contourpy==1.0.7
- cycler==0.11.0
- defopt==6.4.0
- docutils==0.19
- exceptiongroup==1.1.1
- executing==1.2.0
- faker==18.3.2
- fastapi==0.95.0
- filelock==3.10.7
- fonttools==4.39.3
- fvalues==0.0.3
- h11==0.14.0
- httpcore==0.16.3
- httpx==0.23.3
- huggingface-hub==0.13.3
- idna==3.4
- iniconfig==2.0.0
- joblib==1.2.0
- kiwisolver==1.4.4
- levenshtein==0.20.9
- markdown-it-py==2.2.0
- matplotlib==3.7.1
- mdurl==0.1.2
- merge-args==0.1.5
- more-itertools==9.1.0
- mypy-extensions==1.0.0
- nest-asyncio==1.5.6
- nltk==3.8.1
- numerizer==0.2.2
- numpy==1.24.2
- ought-ice==0.5.0
- packaging==23.0
- pandas==2.0.0
- pathspec==0.11.1
- pillow==9.5.0
- platformdirs==3.2.0
- pluggy==1.0.0
- pockets==0.9.1
- prompt-toolkit==3.0.38
- pydantic==1.10.7
- pygments==2.14.0
- pyparsing==3.0.9
- pytest-asyncio==0.21.0
- pytest==7.2.2
- python-dateutil==2.8.2
- python-dotenv==1.0.0
- python-levenshtein==0.20.9
- python-ulid==1.1.0
- pytz==2023.3
- pyyaml==6.0
- questionary==1.10.0
- rapidfuzz==2.15.0
- regex==2023.3.23
- requests==2.28.2
- rfc3986==1.5.0
- rich==13.3.3
- rouge-metric==1.0.1
- ruamel-yaml-clib==0.2.7
- ruamel-yaml==0.17.21
- scikit-learn==1.2.2
- scipy==1.10.1
- six==1.16.0
- sniffio==1.3.0
- sphinxcontrib-napoleon==0.7
- starlette==0.26.1
- structlog==22.3.0
- tenacity==8.2.2
- thefuzz==0.19.0
- threadpoolctl==3.1.0
- tokenizers==0.13.2
- tomli==2.0.1
- tqdm==4.65.0
- transformers==4.27.4
- typing-extensions==4.5.0
- tzdata==2023.3
- urllib3==1.26.15
- uvicorn==0.21.1
- wcwidth==0.2.6
- websockets==11.0


زبان مورد نیاز

مقدار نام
>=3.7 Python


نحوه نصب


نصب پکیج whl citoplasm-0.0.5:

    pip install citoplasm-0.0.5.whl


نصب پکیج tar.gz citoplasm-0.0.5:

    pip install citoplasm-0.0.5.tar.gz