Prompt as Function
"Don't write any code, just tell what to do!"
This is a significant milestone for Large Language Models (LLMs) and the coding process. The prompt-as library serves as a foundation for using prompts to perform tasks in Python. We are currently developing this mindset for several features in our products. With our open-source initiative <3, you can use it just like we do.
pip install prompt-as
from prompt_as import prompt_as_config, pf
prompt_as_config.OPENAI_API_KEY = "sk-**"
@pf
def sleep(second:str) -> bool:
"""
Sleeps for the given seconds and returns True.
"""
Testing and Settings
Model Settings
You can change the OpenAI model that have been used for `prompt-as`.from prompt_as import prompt_as_config, pf
prompt_as_config.OPENAI_MODEL = "gpt-4-turbo"
# Model Setting
prompt_as_config.OPENAI_API_KEY = "sk-**"
@pf
def sleep(second:str) -> bool:
"""
Sleeps for the given seconds and returns True.
"""
Testing
If you want to test this library on a large scale, you can use our test system as well.
from prompt_as import prompt_as_config, pf
prompt_as_config.OPENAI_API_KEY = "sk-**"
@pf
def sleep(second:str) -> bool:
"""
Sleeps for the given seconds and returns True.
"""
# Testing
from prompt_as import Prompt_As_Test_System
Prompt_As_Test_System(sleep_time, [(["2"], {})], [True], [False]).run_test()
# (function_name, test_args_and_kwargs, expected_outputs, bad_outputs)
Metadata
Release files for prompt-as 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prompt_as-0.2.0.tar.gz | 7.1 kB | Without provenance | Details for prompt_as-0.2.0.tar.gz |
Release files / prompt_as-0.2.0.tar.gz
| Download URL | prompt_as-0.2.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ab92a8cd5da8cbe06e8106e34c227d1bc3b330dd9e197918c82d0963d6e2c59
|
|
BLAKE2b-256 checksum How to use checksums |
011a9220ea4ca4f8f2bbf312d43b6bbfd994bd744fa0d92f98683eacbb123afb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.18
|
Security for prompt-as 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.