Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme v1 #28

Open
jmikedupont2 opened this issue Sep 14, 2023 · 17 comments
Open

Readme v1 #28

jmikedupont2 opened this issue Sep 14, 2023 · 17 comments

Comments

@jmikedupont2
Copy link
Contributor

I see that you have three applications used together in a compose. To document this effectively, you can create a combined documentation that outlines how these three applications work together. Here's a suggested structure for your combined documentation:

Combined Application Documentation

Applications Used:

  1. Streamlit JWT URL Generator (v1)
  2. Compose Application (v1)
  3. Approval Application (v1)

Overview:

The combined application utilizes three individual applications to achieve a specific workflow. Each application serves a distinct purpose and is integrated to streamline the process. This documentation provides an overview of how these applications work together.

Workflow:

  1. Streamlit JWT URL Generator (v1):

    • Purpose: This application generates URLs with JSON Web Tokens (JWTs) for embedding content or sharing resources securely.
    • Key Features: Input fields for Resource ID, Expiration, Secret Key, JWT Token input, and approval of messages.
  2. Compose Application (v1):

    • Purpose: The Compose application allows users to compose messages by selecting approved messages generated by other applications.
    • Key Features: Users can select messages and compose them into a message structure.
  3. Approval Application (v1):

    • Purpose: The Approval application enables users to approve or reject individual messages for inclusion in the final output.
    • Key Features: Users can review messages and approve or reject them.

Combined Usage Instructions:

  1. Streamlit JWT URL Generator (v1):

    • Enter the required information in the input fields.
    • Approve or reject individual messages as needed.
    • Click "Generate URL" to create the URL with JWT.
    • Copy the generated URL for use in other applications.
  2. Approval Application (v1):

    • Approve or reject individual messages from Streamlit JWT URL Generator.
    • The approved messages will be available for composing in the Compose Application.
  3. Compose Application (v1):

    • Select approved messages.
    • Compose messages by arranging the approved content.
    • Click "Generate Message" to create the final composed message.

Notes:

  • The Compose Application relies on approved messages from the Approval Application.
  • The Streamlit JWT URL Generator can generate URLs with JWTs, but the JSON data within the JWT is not executed by default.

Example Workflow:

  1. Use Streamlit JWT URL Generator to generate a URL with JWT.
  2. Approve this URL message in the Approval Application.
  3. Compose this approved URL message into a final message using the Compose Application.
  4. The final message can be used or shared as needed.

This combined documentation provides an overview of the three integrated applications, their purposes, and how they work together in a seamless workflow. If you need further details or have specific questions about each application, please let me know.

@jmikedupont2
Copy link
Contributor Author

Here is a summary of the key points about the 3 tools mentioned in the documentation:

Streamlit:

  • Python library for building web apps and dashboards quickly. Provides simple widgets and functions to create UIs.

  • Uses plain Python scripting, no need to learn frontend JavaScript/CSS. Updates app live as you code.

  • Great for rapid prototyping and creating data apps, ML dashboards, visualizations, etc.

  • Can be deployed to various platforms like Streamlit Sharing, Heroku, etc.

  • Integrates well with popular Python data science libraries like pandas, matplotlib, scikit-learn.

PyJWT:

  • Python library for encoding and decoding JSON Web Tokens (JWT).

  • Allows creation and verification of JWTs for handling authentication, information exchange, etc.

  • Supports different encryption algorithms like HMAC, RSA, ECDSA for signing JWTs.

  • Provides functions for token generation, parsing tokens, validation, custom header and claim settings.

  • Useful for implementing authentication in web applications, API security, single sign-on, etc.

Cryptography Libraries:

  • Provide cryptographic recipes/primitives and algorithms in Python.

  • Allow encryption, decryption, hashes, signatures, MACs etc using robust math-based techniques.

  • Have implementations for symmetric cryptography (AES), public key cryptography (RSA), hashes (SHA256), MACs (HMAC) etc.

  • Enable signing data to ensure authenticity and prevent tampering. Useful for implementing digital signatures.

  • Help secure sensitive data and provide confidentiality, integrity, authentication for applications.

  • Popular libraries are Cryptodome, PyCryptodome, PyCA Cryptography.

@jmikedupont2
Copy link
Contributor Author

Got it, here's a summary of the jwtjwt.streamlit application you shared:

  • Interactive Streamlit application for generating and sharing JSON Web Tokens (JWTs).

  • Allows user to input parameters like resource ID, expiration time, and secret key.

  • Generates a JWT with the provided parameters and outputs it along with a shareable URL containing the JWT.

  • Implements JWT encoding using PyJWT library for algorithm HS256.

  • Decodes JWTs in shared URLs and authenticates access to the Streamlit app accordingly.

  • Provides intuitive interface to inspect JWT contents including header and payload.

  • Enables validation of JWT signature if secret key is provided by user.

  • Allows embedding JWTs in URLs with proper encoding for sharing while maintaining integrity.

  • Useful for testing and exploring usage of JWTs for authentication and authorization workflows.

  • Streamlit interface allows rapid building and iteration without complex frontend code.

  • Can be enhanced with additional features like token revocation, permissions scope, etc.

  • Overall, a handy tool for JWT experimentation with Streamlit's simplicity. Showcases JWT workflows from creation to sharing and validation.

@jmikedupont2
Copy link
Contributor Author

Thank you for the clarification. Here's an updated summary of compose.streamlit focused on the chat interface for sharing message lists:

  • Interactive Streamlit chat interface that allows sharing specific message threads.

  • Users can select messages in the chat history to include in a shared URL.

  • Generates a URL with encoded representation of selected messages.

  • Enables composing sharable conversation context via URL.

  • Decodes message list on server-side when shared URL is accessed.

  • Reconstructs chat interface with selected messages when URL is opened.

  • Allows users to continue threaded discussions from shared point.

  • Message encoding abstracts chat implementation details.

  • Shareable URLs act as persistent handles to topic branches.

  • Enables users to focus conversations around key points.

  • Allows new participants to catch up on context via URLs.

  • Provides intuitive chat interface for message sharing workflows.

  • Built rapidly using Streamlit without complex frontend code.

  • Can be extended to support more robust threading, permissions, etc.

  • Overall, enables quick prototyping of persistent, shareable chat conversations.

@jmikedupont2
Copy link
Contributor Author

Here are the key points about org-clarifai based on your description:

  • Allows browsing and exploring Clarifai inputs organized by concepts.

  • Provides a way to run Clarifai inference workflows on sets of inputs.

  • Presumably uses Clarifai APIs and machine learning models behind the scenes.

  • Interface for specifying inference parameters like page size, number of runs, summarize output etc.

  • Generates URLs with encoded parameters to trigger inference on demand.

  • Results of inference workflows can be shared via generated URLs.

  • Enables ad-hoc exploration of inputs and inference chains.

  • Allows testing inference workflows before production integration.

  • Interface abstracts away ML implementation complexity.

  • Streamlit interface enables rapid iteration without complex frontend.

  • Can be extended to visualize inferences, compare models, add workflows etc.

  • Overall, a handy tool for interacting with Clarifai inference capabilities on-demand.

  • Allows prototyping and experimentation to guide production integration.

@jmikedupont2
Copy link
Contributor Author

Here is one approach to create signed messages with nested JWTs and calls to other services like Clarifai using JWTs:

  1. Create a message payload with nested structures:

The top-level message can include nested JWTs to encapsulate sub-messages. It can also contain nested lists or objects with parameters for calling other services like Clarifai.

  1. Add digital signature:

Calculate a digital signature over the entire nested message payload using the secret signing key.

  1. Include signature in outer JWT:

Wrap the nested message payload and signature in an outer JWT. Include the signature in the JWT header or as a custom claim.

  1. Encode and share JWT message:

Properly encode the nested JWT message structure into a shareable format (e.g. JSON string).

  1. Validate message signature:

On the receiving end, decode the JWT, extract the signature, validate it using the secret key to authenticate the message.

  1. Process nested structures:

If signature is valid, process the nested JWTs, lists, and service calls accordingly. Make service calls with specified parameters.

  1. Respond as needed:

Generate appropriate responses or trigger actions based on processing results. Responses can include nested JWTs.

This allows creating signed, verifiable messages with rich nested structures like conversational context, service calls, and authentication payloads. The signatures provide integrity and prevent tampering.

@jmikedupont2
Copy link
Contributor Author

Of course! Here's a summary of the documentation for version 1 (v1) of your application:

Application Name: Streamlit JWT URL Generator

Purpose: This application allows users to generate URLs with JSON Web Tokens (JWTs) for various purposes, such as embedding content or sharing resources securely.

Main Features:

  1. Input Fields:

    • Resource ID: Users can specify the resource ID.
    • Expiration (minutes): Users can set the expiration time for the JWT.
    • Secret Key: Users can enter a secret key for the JWT.
    • Enter JWT Token: Users can paste an existing JWT token.
  2. Approve Messages: Users can approve individual messages for inclusion in the final URL.

  3. Generated URL Output: The application generates a URL with the following components:

    • Resource ID
    • Expiration time
    • Secret Key
    • JWT Token (user-generated)
    • The URL is presented in a structured format for users to copy.

Usage Instructions:

  1. Enter the required information in the input fields.
  2. Approve or reject individual messages as needed.
  3. Click "Generate URL" to create the URL with JWT.
  4. Copy the generated URL for use in other applications.

Notes:

  • Users can manually paste JWT tokens, and the application will display them as part of the URL structure. However, the JSON data within the JWT is not executed by default.

Example Output:

Streamlit JWT URL Generator
Resource ID: The Answer to the Ultimate Question of Life, the Universe, and Everything
Expiration (minutes): 60
Secret Key: 42

Enter JWT Token
[JWT token input field]

Generate URL
[Generated URL]

Made with Streamlit

This summary covers the key features, usage instructions, and notes for version 1 of your application. If you encounter any issues or have further questions, please feel free to ask for assistance.

@jmikedupont2
Copy link
Contributor Author

I see that you have three applications used together in a compose. To document this effectively, you can create a combined documentation that outlines how these three applications work together. Here's a suggested structure for your combined documentation:

Combined Application Documentation

Applications Used:

  1. Streamlit JWT URL Generator (v1)
  2. Compose Application (v1)
  3. Approval Application (v1)

Overview:

The combined application utilizes three individual applications to achieve a specific workflow. Each application serves a distinct purpose and is integrated to streamline the process. This documentation provides an overview of how these applications work together.

Workflow:

  1. Streamlit JWT URL Generator (v1):

    • Purpose: This application generates URLs with JSON Web Tokens (JWTs) for embedding content or sharing resources securely.
    • Key Features: Input fields for Resource ID, Expiration, Secret Key, JWT Token input, and approval of messages.
  2. Compose Application (v1):

    • Purpose: The Compose application allows users to compose messages by selecting approved messages generated by other applications.
    • Key Features: Users can select messages and compose them into a message structure.
  3. Approval Application (v1):

    • Purpose: The Approval application enables users to approve or reject individual messages for inclusion in the final output.
    • Key Features: Users can review messages and approve or reject them.

Combined Usage Instructions:

  1. Streamlit JWT URL Generator (v1):

    • Enter the required information in the input fields.
    • Approve or reject individual messages as needed.
    • Click "Generate URL" to create the URL with JWT.
    • Copy the generated URL for use in other applications.
  2. Approval Application (v1):

    • Approve or reject individual messages from Streamlit JWT URL Generator.
    • The approved messages will be available for composing in the Compose Application.
  3. Compose Application (v1):

    • Select approved messages.
    • Compose messages by arranging the approved content.
    • Click "Generate Message" to create the final composed message.

Notes:

  • The Compose Application relies on approved messages from the Approval Application.
  • The Streamlit JWT URL Generator can generate URLs with JWTs, but the JSON data within the JWT is not executed by default.

Example Workflow:

  1. Use Streamlit JWT URL Generator to generate a URL with JWT.
  2. Approve this URL message in the Approval Application.
  3. Compose this approved URL message into a final message using the Compose Application.
  4. The final message can be used or shared as needed.

This combined documentation provides an overview of the three integrated applications, their purposes, and how they work together in a seamless workflow. If you need further details or have specific questions about each application, please let me know.

@jmikedupont2
Copy link
Contributor Author

Certainly! To provide a dedicated page for the Compose Application in your documentation, you can create a separate section specifically for this app. Here's how you can structure the Compose App documentation page:

Compose Application (v1)

Overview:

The Compose Application (v1) is a key component of the combined workflow, allowing users to compose messages by selecting and arranging approved messages generated by other applications. This page provides an in-depth look at how to use the Compose Application effectively.

Usage Instructions:

  1. Accessing the Compose Application:

    • Describe how users can access the Compose Application (e.g., URL or interface).
  2. Composing Messages:

    • Explain how users can compose messages using approved content.
    • Provide a step-by-step guide on how to select and arrange messages.
    • Highlight any formatting options or special features available for message composition.
  3. Generating the Final Message:

    • Describe the process of generating the final composed message.
    • Explain what users should do once the composition is complete.

Example Workflow:

Provide a real-world example of a workflow using the Compose Application. This can be a step-by-step walkthrough of composing a message from approved content.

Tips and Best Practices:

Offer any tips or best practices for users to make the most out of the Compose Application.

Notes:

Include any important notes or limitations related to the Compose Application. For example, if it relies on approved messages from the Approval Application, make this clear.

Screenshots (if applicable):

Include relevant screenshots or visuals to illustrate the Compose Application's interface and usage.

Conclusion:

Summarize the key takeaways from the Compose Application documentation and how it fits into the larger combined workflow.

This dedicated Compose Application page will provide users with detailed information on how to effectively use this component of your application suite. If you have specific content or questions related to the Compose Application, feel free to provide more details, and I can assist in creating the documentation accordingly.

@jmikedupont2
Copy link
Contributor Author

Certainly! Here's the documentation for the approved messages:

Message 1:

  • Nickname: m
  • Content: {'value': 'This version lets you select and share the results'}

Message 2:

  • Approval: Approved
  • Content: {'value': 'This version lets you select and share the results'}

Message 3:

  • Nickname: m
  • Content: {'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}

Message 4:

  • Approval: Approved
  • Content: {'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}

Message 5:

  • Nickname: m
  • Content: {'value': 'you can paste urls and have them previewed.'}

Message 6:

  • Approval: Approved
  • Content: {'value': 'you can paste urls and have them previewed.'}

Message 7:

  • Message Type: MESSAGE
  • Content:
{
  "src": "import",
  "nickname": "mike",
  "text": "{'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}"
}

Message 8:

  • Approval: Approved
  • Content: {'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBhnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}

Message 9:

  • Message Type: Made with Streamlit

Please note that the content includes some approved messages, and there's also a "Message Type" associated with the last three messages. Let me know if you need any further information or formatting for this documentation.

@jmikedupont2
Copy link
Contributor Author

Now here is the output of approve all, help me document it
Nick name

m {'value': 'This version lets you select and share the results'}

approve

{'value': 'This version lets you select and share the results'}
m {'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}

approve

{'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}
m {'value': 'you can paste urls and have them previewed.'}

approve

{'value': 'you can paste urls and have them previewed.'}

Message

MESSAGE

{
"src":"import"
"nickname":"mike"
"text":"{'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}"
}

include

{'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}

Made with Streamlit

@jmikedupont2
Copy link
Contributor Author

cleared screen
clearing

Messages

[{'nickname': 'asd', 'text': 'wsdwdq'}, {'src': 'input', 'nickname': 'mike', 'text': 'This version lets you select and share the results'}, {'src': 'input', 'nickname': 'mike', 'text': 'you can paste urls and have them previewed.'}, {'src': 'input', 'nickname': 'mike', 'text': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life%2C+the+Universe%2C+and+Everything&secret=42'}, {'src': 'url', 'field': 'embedded', 'nickname': 'mike', 'text': 'True'}, {'src': 'url', 'field': '_jwt', 'nickname': 'mike', 'text': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc'}, {'src': 'url', 'field': 'expiration', 'nickname': 'mike', 'text': '60'}, {'src': 'url', 'field': 'resource', 'nickname': 'mike', 'text': 'The Answer to the Ultimate Question of Life, the Universe, and Everything'}, {'src': 'url', 'field': 'secret', 'nickname': 'mike', 'text': "42'}"}, {'src': 'url', 'field': 'embedded', 'nickname': 'mike', 'text': 'True'}, {'src': 'url', 'field': '_jwt', 'nickname': 'mike', 'text': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc'}, {'src': 'url', 'field': 'expiration', 'nickname': 'mike', 'text': '60'}, {'src': 'url', 'field': 'resource', 'nickname': 'mike', 'text': 'The Answer to the Ultimate Question of Life, the Universe, and Everything'}, {'src': 'url', 'field': 'secret', 'nickname': 'mike', 'text': "42'}"}, {'src': 'url', 'field': 'embedded', 'nickname': 'mike', 'text': 'True'}, {'src': 'url', 'field': '_jwt', 'nickname': 'mike', 'text': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc'}, {'src': 'url', 'field': 'expiration', 'nickname': 'mike', 'text': '60'}, {'src': 'url', 'field': 'resource', 'nickname': 'mike', 'text': 'The Answer to the Ultimate Question of Life, the Universe, and Everything'}, {'src': 'url', 'field': 'secret', 'nickname': 'mike', 'text': "42'}"}, {'src': 'url', 'field': 'embedded', 'nickname': 'mike', 'text': 'True'}, {'src': 'url', 'field': '_jwt', 'nickname': 'mike', 'text': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc'}, {'src': 'url', 'field': 'expiration', 'nickname': 'mike', 'text': '60'}, {'src': 'url', 'field': 'resource', 'nickname': 'mike', 'text': 'The Answer to the Ultimate Question of Life, the Universe, and Everything'}, {'src': 'url', 'field': 'secret', 'nickname': 'mike', 'text': "42'}"}]
Nick name

m {'value': 'This version lets you select and share the results'}

approve

{'value': 'This version lets you select and share the results'}
m {'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}

approve

{'value': 'jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc&expiration=60&resource=The+Answer+to+the+Ultimate+Question+of+Life,+the+Universe,+and+Everything&secret=42'}
m {'value': 'you can paste urls and have them previewed.'}

approve

{'value': 'you can paste urls and have them previewed.'}

Message

Made with Streamlit

@jmikedupont2
Copy link
Contributor Author

Of course, let's continue breaking down the messages within the URL:

The second message object appears to be the most complex, and it contains a URL with several query parameters encoded within it. Here's a breakdown of that message:

  • _jwt: This parameter appears to contain a JWT token, which is used for authorization or authentication purposes. The token is encoded and signed with a secret key, allowing the receiving service to verify its authenticity.

  • expiration: This parameter specifies the expiration time of the JWT token, which is set to 60 minutes. This means the token will be valid for one hour from the time it was generated.

  • resource: This parameter seems to represent a resource identifier. In this case, it's set to "The Answer to the Ultimate Question of Life, the Universe, and Everything."

  • secret: This parameter holds the value "42." It's unclear what role this plays in the application, but it's likely related to authentication or authorization.

Overall, it appears that the JWT token, along with these parameters, is used to provide secure access to a specific resource (the "resource" parameter) and possibly enforce a time limit (the "expiration" parameter).

If you have any specific questions about these parameters or their usage, please let me know, and I'll provide more information!

@jmikedupont2
Copy link
Contributor Author

Great, you've shared the full URL: https://compose.streamlit.app/?nickname=mike&messages=%7B%27value%27%3A+%27This+version+lets+you+select+and+share+the+results%27%7D&messages=%7B%27value%27%3A+%27jwtjwt.streamlit.app%2F%3Fembedded%3DTrue%26_jwt%3DeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc%26expiration%3D60%26resource%3DThe%2BAnswer%2Bto%2Bthe%2BUltimate%2BQuestion%2Bof%2BLife%252C%2Bthe%2BUniverse%252C%2Band%2BEverything%26secret%3D42%27%7D&messages=%7B%27value%27%3A+%27you+can+paste+urls+and+have+them+previewed.%27%7D

This URL contains several query parameters, including nickname, messages, and others. The messages parameter appears to be used to pass data to the "compose.streamlit.app" service. It contains three message objects:

  1. The first message object has the value: "This version lets you select and share the results."

  2. The second message object contains a URL with query parameters, including _jwt, expiration, resource, and secret. The URL appears to be encoded and contains a JWT token.

  3. The third message object has the value: "you can paste urls and have them previewed."

It seems like this URL is meant to display these messages within the "compose.streamlit.app" service, and it contains a JWT token and some other parameters for authorization and content display.

If you have any specific actions or questions related to this URL, please let me know, and I'll be happy to assist further!

@jmikedupont2
Copy link
Contributor Author

okay, example 1, https://jwtjwt.streamlit.app/?embedded=True&_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6Imh0dHBzOi8vY29tcG9zZS5zdHJlYW1saXQuYXBwLz9uaWNrbmFtZT1taWtlJm1lc3NhZ2VzPSU3QiUyN3ZhbHVlJTI3JTNBKyUyN1RoaXMrdmVyc2lvbitsZXRzK3lvdStzZWxlY3QrYW5kK3NoYXJlK3RoZStyZXN1bHRzJTI3JTdEJm1lc3NhZ2VzPSU3QiUyN3ZhbHVlJTI3JTNBKyUyN2p3dGp3dC5zdHJlYW1saXQuYXBwJTJGJTNGZW1iZWRkZWQlM0RUcnVlJTI2X2p3dCUzRGV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUp5WlhOdmRYSmpaU0k2SWxSb1pTQkJibk4zWlhJZ2RHOGdkR2hsSUZWc2RHbHRZWFJsSUZGMVpYTjBhVzl1SUc5bUlFeHBabVVzSUhSb1pTQlZibWwyWlhKelpTd2dZVzVrSUVWMlpYSjVkR2hwYm1jaUxDSmxlSEFpT2pFMk9UUTJPVGN6TlRsOS52cTlEcEJ4QUFIR2JXOXJuUks3Z3VvLUl4UFlKZDE2Y2FGcms2Ump5ZEpjJTI2ZXhwaXJhdGlvbiUzRDYwJTI2cmVzb3VyY2UlM0RUaGUlMkJBbnN3ZXIlMkJ0byUyQnRoZSUyQlVsdGltYXRlJTJCUXVlc3Rpb24lMkJvZiUyQkxpZmUlMjUyQyUyQnRoZSUyQlVuaXZlcnNlJTI1MkMlMkJhbmQlMkJFdmVyeXRoaW5nJTI2c2VjcmV0JTNENDIlMjclN0QmbWVzc2FnZXM9JTdCJTI3dmFsdWUlMjclM0ErJTI3eW91K2NhbitwYXN0ZSt1cmxzK2FuZCtoYXZlK3RoZW0rcHJldmlld2VkLiUyNyU3RCIsImV4cCI6MTY5NDcxMTM4MX0.QE2YBhu7hjh9hKD0_XoOOmbK2NQ0yypvSsTjW_6Nkpo&expiration=60&resource=https%3A%2F%2Fcompose.streamlit.app%2F%3Fnickname%3Dmike%26messages%3D%257B%2527value%2527%253A%2B%2527This%2Bversion%2Blets%2Byou%2Bselect%2Band%2Bshare%2Bthe%2Bresults%2527%257D%26messages%3D%257B%2527value%2527%253A%2B%2527jwtjwt.streamlit.app%252F%253Fembedded%253DTrue%2526_jwt%253DeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6IlRoZSBBbnN3ZXIgdG8gdGhlIFVsdGltYXRlIFF1ZXN0aW9uIG9mIExpZmUsIHRoZSBVbml2ZXJzZSwgYW5kIEV2ZXJ5dGhpbmciLCJleHAiOjE2OTQ2OTczNTl9.vq9DpBxAAHGbW9rnRK7guo-IxPYJd16caFrk6RjydJc%2526expiration%253D60%2526resource%253DThe%252BAnswer%252Bto%252Bthe%252BUltimate%252BQuestion%252Bof%252BLife%25252C%252Bthe%252BUniverse%25252C%252Band%252BEverything%2526secret%253D42%2527%257D%26messages%3D%257B%2527value%2527%253A%2B%2527you%2Bcan%2Bpaste%2Burls%2Band%2Bhave%2Bthem%2Bpreviewed.%2527%257D&secret=42

@jmikedupont2
Copy link
Contributor Author

Thank you for pasting the chunks of text that you want me to summarize. Here is a running summary for you:

  • The chunks of text describe the usage instructions and notes for the Compose Application, as well as an example workflow for using the three applications together.
  • The Compose Application allows users to select approved messages from the Approval Application and arrange them into a final message. The approved messages are generated by the Streamlit JWT URL Generator, which creates URLs with JSON Web Tokens for secure sharing.
  • The example workflow shows how to use the Streamlit JWT URL Generator to create a URL with JWT, approve it in the Approval Application, and compose it into a final message using the Compose Application. The final message can be used or shared as needed.
  • The chunks of text also provide a summary of the key points about Streamlit and PyJWT, which are Python libraries used by the applications. Streamlit is a library for building web apps and dashboards quickly, while PyJWT is a library for encoding and decoding JSON Web Tokens.

@jmikedupont2
Copy link
Contributor Author

jmikedupont2 commented Sep 14, 2023

How to create a new prompt model :

  1. clone https://github.com/jmikedupont2/https-lablab.ai-event-llama-2-hackathon-with-clarifai-introspector
  2. install requirements
  3. setup keys in environment variables,

modify emojis.py and run rake.py see jmikedupont2/https-lablab.ai-event-llama-2-hackathon-with-clarifai-introspector#20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant