├── .devcontainer └── devcontainer.json ├── .editorconfig ├── .github └── workflows │ ├── integration-tests.yml │ ├── pre-commit.yaml │ └── release.yml ├── .gitignore ├── .pre-commit-config.yaml ├── LICENSE ├── Makefile ├── README.md ├── __init__.py ├── conftest.py ├── poetry.lock ├── promptlayer ├── __init__.py ├── exceptions.py ├── groups │ ├── __init__.py │ └── groups.py ├── promptlayer.py ├── promptlayer_base.py ├── promptlayer_mixins.py ├── span_exporter.py ├── streaming │ ├── __init__.py │ ├── blueprint_builder.py │ ├── response_handlers.py │ └── stream_processor.py ├── templates.py ├── track │ ├── __init__.py │ └── track.py ├── types │ ├── __init__.py │ ├── prompt_template.py │ └── request_log.py └── utils.py ├── pyproject.toml └── tests ├── fixtures ├── __init__.py ├── auth.py ├── cassettes │ ├── test_anthropic_chat_completion.yaml │ ├── test_anthropic_chat_completion_async.yaml │ ├── test_anthropic_chat_completion_async_stream_with_pl_id.yaml │ ├── test_anthropic_chat_completion_with_pl_id.yaml │ ├── test_anthropic_chat_completion_with_stream.yaml │ ├── test_anthropic_chat_completion_with_stream_and_pl_id.yaml │ ├── test_arun_workflow_request.yaml │ ├── test_get_all_templates.yaml │ ├── test_get_final_output_1.yaml │ ├── test_get_final_output_2.yaml │ ├── test_get_prompt_template_provider_base_url_name.yaml │ ├── test_get_template_async.yaml │ ├── test_log_request_async.yaml │ ├── test_make_message_listener_1.yaml │ ├── test_make_message_listener_2.yaml │ ├── test_openai_chat_completion.yaml │ ├── test_openai_chat_completion_async.yaml │ ├── test_openai_chat_completion_async_stream_with_pl_id.yaml │ ├── test_openai_chat_completion_with_pl_id.yaml │ ├── test_openai_chat_completion_with_stream.yaml │ ├── test_openai_chat_completion_with_stream_and_pl_id.yaml │ ├── test_publish_template_async.yaml │ ├── test_run_prompt_async.yaml │ └── test_track_and_templates.yaml ├── clients.py ├── setup.py ├── templates.py └── workflow_update_messages.py ├── test_agents ├── __init__.py ├── test_arun_workflow_request.py └── test_misc.py ├── test_anthropic_proxy.py ├── test_get_prompt_template.py ├── test_latency_recording.py ├── test_openai_proxy.py ├── test_promptlayer_run.py ├── test_templates_groups_track.py └── utils ├── mocks.py └── vcr.py /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/.devcontainer/devcontainer.json -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/.editorconfig -------------------------------------------------------------------------------- /.github/workflows/integration-tests.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/.github/workflows/integration-tests.yml -------------------------------------------------------------------------------- /.github/workflows/pre-commit.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/.github/workflows/pre-commit.yaml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/.gitignore -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/.pre-commit-config.yaml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/README.md -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | # TODO(dmu) LOW: This file seems unnecessary. Consider removal 2 | -------------------------------------------------------------------------------- /conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/conftest.py -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/poetry.lock -------------------------------------------------------------------------------- /promptlayer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/__init__.py -------------------------------------------------------------------------------- /promptlayer/exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/exceptions.py -------------------------------------------------------------------------------- /promptlayer/groups/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/groups/__init__.py -------------------------------------------------------------------------------- /promptlayer/groups/groups.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/groups/groups.py -------------------------------------------------------------------------------- /promptlayer/promptlayer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/promptlayer.py -------------------------------------------------------------------------------- /promptlayer/promptlayer_base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/promptlayer_base.py -------------------------------------------------------------------------------- /promptlayer/promptlayer_mixins.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/promptlayer_mixins.py -------------------------------------------------------------------------------- /promptlayer/span_exporter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/span_exporter.py -------------------------------------------------------------------------------- /promptlayer/streaming/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/streaming/__init__.py -------------------------------------------------------------------------------- /promptlayer/streaming/blueprint_builder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/streaming/blueprint_builder.py -------------------------------------------------------------------------------- /promptlayer/streaming/response_handlers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/streaming/response_handlers.py -------------------------------------------------------------------------------- /promptlayer/streaming/stream_processor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/streaming/stream_processor.py -------------------------------------------------------------------------------- /promptlayer/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/templates.py -------------------------------------------------------------------------------- /promptlayer/track/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/track/__init__.py -------------------------------------------------------------------------------- /promptlayer/track/track.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/track/track.py -------------------------------------------------------------------------------- /promptlayer/types/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/types/__init__.py -------------------------------------------------------------------------------- /promptlayer/types/prompt_template.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/types/prompt_template.py -------------------------------------------------------------------------------- /promptlayer/types/request_log.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/types/request_log.py -------------------------------------------------------------------------------- /promptlayer/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/promptlayer/utils.py -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/pyproject.toml -------------------------------------------------------------------------------- /tests/fixtures/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/__init__.py -------------------------------------------------------------------------------- /tests/fixtures/auth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/auth.py -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_anthropic_chat_completion.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_anthropic_chat_completion.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_anthropic_chat_completion_async.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_anthropic_chat_completion_async.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_anthropic_chat_completion_async_stream_with_pl_id.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_anthropic_chat_completion_async_stream_with_pl_id.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_anthropic_chat_completion_with_pl_id.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_anthropic_chat_completion_with_pl_id.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_anthropic_chat_completion_with_stream.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_anthropic_chat_completion_with_stream.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_anthropic_chat_completion_with_stream_and_pl_id.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_anthropic_chat_completion_with_stream_and_pl_id.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_arun_workflow_request.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_arun_workflow_request.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_get_all_templates.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_get_all_templates.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_get_final_output_1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_get_final_output_1.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_get_final_output_2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_get_final_output_2.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_get_prompt_template_provider_base_url_name.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_get_prompt_template_provider_base_url_name.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_get_template_async.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_get_template_async.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_log_request_async.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_log_request_async.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_make_message_listener_1.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_make_message_listener_1.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_make_message_listener_2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_make_message_listener_2.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_openai_chat_completion.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_openai_chat_completion.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_openai_chat_completion_async.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_openai_chat_completion_async.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_openai_chat_completion_async_stream_with_pl_id.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_openai_chat_completion_async_stream_with_pl_id.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_openai_chat_completion_with_pl_id.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_openai_chat_completion_with_pl_id.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_openai_chat_completion_with_stream.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_openai_chat_completion_with_stream.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_openai_chat_completion_with_stream_and_pl_id.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_openai_chat_completion_with_stream_and_pl_id.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_publish_template_async.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_publish_template_async.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_run_prompt_async.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_run_prompt_async.yaml -------------------------------------------------------------------------------- /tests/fixtures/cassettes/test_track_and_templates.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/cassettes/test_track_and_templates.yaml -------------------------------------------------------------------------------- /tests/fixtures/clients.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/clients.py -------------------------------------------------------------------------------- /tests/fixtures/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/setup.py -------------------------------------------------------------------------------- /tests/fixtures/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/templates.py -------------------------------------------------------------------------------- /tests/fixtures/workflow_update_messages.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/fixtures/workflow_update_messages.py -------------------------------------------------------------------------------- /tests/test_agents/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/test_agents/test_arun_workflow_request.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/test_agents/test_arun_workflow_request.py -------------------------------------------------------------------------------- /tests/test_agents/test_misc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/test_agents/test_misc.py -------------------------------------------------------------------------------- /tests/test_anthropic_proxy.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/test_anthropic_proxy.py -------------------------------------------------------------------------------- /tests/test_get_prompt_template.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/test_get_prompt_template.py -------------------------------------------------------------------------------- /tests/test_latency_recording.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/test_latency_recording.py -------------------------------------------------------------------------------- /tests/test_openai_proxy.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/test_openai_proxy.py -------------------------------------------------------------------------------- /tests/test_promptlayer_run.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/test_promptlayer_run.py -------------------------------------------------------------------------------- /tests/test_templates_groups_track.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/test_templates_groups_track.py -------------------------------------------------------------------------------- /tests/utils/mocks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/utils/mocks.py -------------------------------------------------------------------------------- /tests/utils/vcr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MagnivOrg/prompt-layer-library/HEAD/tests/utils/vcr.py --------------------------------------------------------------------------------