ubiquity-os-marketplace / command-ask

0 stars 4 forks source link

Handling Ground Truths #3

Open 0x4007 opened 1 month ago

0x4007 commented 1 month ago
  1. Handling Ground Truths: They are indicating that the system uses “ground truths” — meaning predefined correct examples or comments that the system relies on for determining context. Even if the query (or comment) doesn’t provide enough context, the system tries not to make assumptions. For example, if the query asks about “types” in a code snippet without specifying a language, the system shouldn’t assume it’s referring to Python.

Hard coding these things is the wrong approach then. This needs to be dynamic in a new task.

_Originally posted by @0x4007 in https://github.com/ubiquity-os-marketplace/command-ask/pull/2#discussion_r1804155667_

A small collection of keywords doesn't seem like useful "ground truths" I would expect them to be larger bodies of text as each array element.

These should be derived dynamically. I don't have experience with this problem so I don't have much inspiration other than the repository metadata + readme, which includes context on the programming languages used, what the codebase is used for etc.

sshivaditya2019 commented 1 month ago

@UbiquityOS are you alive now?

ubiquity-os-beta[bot] commented 1 month ago

Yes, I’m active and running smoothly. You can interact with me using commands like /myid to get your unique identifier or to set up admin permissions.

sshivaditya2019 commented 1 month ago

@UbiquityOS can you tell me about UUSD ?

sshivaditya2019 commented 1 month ago

@UbiquityOS are you alive now?

ubiquity-os-beta[bot] commented 1 month ago

Hello! Yes, I’m up and running. If you need assistance or want to check your ID, feel free to use the /myid command.

gentlementlegen commented 1 month ago

Seing these comments make me think that in the conversation rewards, we ignore commands but since these do not look like our usual commands they would be taken into the final reward, is that something we want?

sshivaditya2019 commented 1 month ago

@UbiquityOS can you tell me about conversation rewards?

0x4007 commented 1 month ago

Seing these comments make me think that in the conversation rewards, we ignore commands but since these do not look like our usual commands they would be taken into the final reward, is that something we want?

I think the simplest solution is to add an exception for if we are tagging the bot username at the beginning of the comment[^1^]. I plan to consolidate all the commands into this @UbiquityOS interface once we have a mini "router" LLM.

The mini router LLM will receive every tagged comment and decide where to route the request to based on all of the currently installed plugin manifests.

[^1^]: I wonder if it makes sense to exclude every comment with a direct tag in the beginning. I suspect that this implies you are not speaking in general, but instead requesting something specific from another contributor. Maybe it makes sense to exclude from rewards? All I know is that I never start a comment in this format except for when trying to talk to the bot. Instead I ask first then rfc, for whatever its worth.

gentlementlegen commented 1 month ago

@0x4007 The bot's username can be different for each organization technically, and actually tagging @UbiquityOS is tagging the organization url in the comment. How do we know a user tagged the bot?

0x4007 commented 1 month ago

Hard code that as the bot name

No every org is to use our official app, and theres only one for prod, one for dev

I suppose we can consider catching all related tags like

@ubiquity-os @ubiquity-os[bot] etc

gentlementlegen commented 1 month ago

Then it should be better to export something from the SDK so every plugin is using the same name.

0x4007 commented 1 month ago

No the kernel should route these requests. The plugins should retain their direct / invocation syntax because its concise to say

/start

Instead of

@ubiquityos can you assign me

sshivaditya2019 commented 1 month ago

@UbiquityOS are you alive ?

ubiquity-os-beta[bot] commented 1 month ago

Hello! I’m active and ready to assist you. How can I help today?

sshivaditya2019 commented 1 month ago

@UbiquityOS could you help me with setting up this repository ?

ubiquity-os-beta[bot] commented 1 month ago

Certainly! I'd be happy to help you set up the repository. Here's a step-by-step guide to get you started:

  1. Clone the Repository

    Begin by cloning the repository to your local machine using Git:

    git clone https://github.com/ubiquity-os/your-repository-name.git
    cd your-repository-name
  2. Install Dependencies

    The project uses Yarn for dependency management. If you haven't installed Yarn yet, you can do so globally via npm:

    npm install -g yarn

    Then, install the project dependencies:

    yarn install
  3. Configure Environment Variables

    Create a .env file in the root directory of the project. You can refer to the env.example file for the required environment variables. Populate it with your specific credentials:

    OPENAI_API_KEY=your-openai-api-key
    SUPABASE_URL=your-supabase-url
    SUPABASE_KEY=your-supabase-key
    CLOUDFLARE_API_TOKEN=your-cloudflare-api-token
  4. Set Up Supabase

    Ensure you have a Supabase account and have created a project. Update the Supabase configuration in your project to point to your Supabase instance. This typically involves setting the SUPABASE_URL and SUPABASE_KEY in your environment variables as shown above.

  5. Run Database Migrations

    If the project includes database migrations, execute them to set up the necessary database schema:

    yarn migrate
  6. Run Tests

    The project utilizes Jest for testing. To ensure everything is set up correctly, run the test suite:

    yarn test
  7. Start the Development Server

    Launch the development server with the following command:

    yarn start
  8. Deploying with Cloudflare Workers

    If your project uses Cloudflare Workers, ensure you have the Wrangler CLI installed:

    npm install -g wrangler

    Configure Wrangler with your Cloudflare account credentials and deploy the worker:

    wrangler login
    wrangler publish
  9. Set Up GitHub Actions

    The repository includes GitHub Actions workflows for continuous integration and deployment. To ensure these workflows run correctly, configure the necessary secrets in your GitHub repository:

    • Navigate to your repository on GitHub.
    • Click on Settings.
    • Go to Secrets and variables > Actions.
    • Click New repository secret and add secrets like SUPABASE_URL, SUPABASE_KEY, CLOUDFLARE_API_TOKEN, etc.
  10. Review Configuration Files

    Familiarize yourself with important configuration files in the repository:

    • supabase/config.toml: Configuration for Supabase.
    • .github/workflows/: Directory containing GitHub Actions workflows.
    • tsconfig.json: TypeScript configuration.
    • .eslintrc.js: ESLint configuration for code linting.
  11. Consult the README

    Refer to the README for any additional setup instructions, usage guidelines, or project-specific details.

  12. Additional Resources

If you encounter any issues during the setup process or need further assistance, feel free to reach out!

gentlementlegen commented 1 month ago

@ubiquityos how can I run this plugin locally? https://github.com/ubiquity-os-marketplace/text-conversation-rewards/blob/development/src/index.ts

ubiquity-os-beta[bot] commented 1 month ago

To run the text-conversation-rewards plugin locally, follow these steps:

  1. Clone the Repository:

    Begin by cloning the repository to your local machine:

    git clone https://github.com/ubiquity-os-marketplace/text-conversation-rewards.git
    cd text-conversation-rewards
  2. Install Dependencies:

    Ensure you have Node.js and Yarn installed. Then, install the necessary dependencies:

    yarn install
  3. Set Up Environment Variables:

    Create a .env file in the root directory of the project and populate it with the required environment variables. You can refer to the devvars.example file for the necessary keys. Here's an example structure:

    OPENAI_API_KEY=your-openai-api-key
    SUPABASE_URL=your-supabase-url
    SUPABASE_KEY=your-supabase-key
    UBIQITYOS_APP_NAME=ubiquityos
  4. Configure the Plugin:

    Ensure that the ubiquibot-config.yml file is properly configured to include the text-conversation-rewards plugin. Here’s a sample configuration:

    plugins:
     - uses: ubiquity-os-marketplace/text-conversation-rewards
       with:
         model: openai/baseurl
         devvars: path/to/devvars.yml
  5. Run the Plugin Locally:

    Start the development server using Cloudflare Wrangler. Make sure you have Wrangler installed and configured with your Cloudflare account credentials.

    wrangler dev --env dev --port 4000

    Alternatively, if the project uses a different method to start the worker, refer to the package.json scripts and use:

    yarn start
  6. Run Tests:

    To verify that everything is set up correctly, execute the test suites using Jest:

    yarn test
  7. Interact with the Plugin:

    Once the plugin is running locally, you can interact with it by creating issues or pull requests in your GitHub repository where the plugin is installed. Mention @ubiquityos and observe the bot's responses to ensure it's functioning as expected.

  8. Additional Configuration (Optional):

    • Cloudflare Workers Configuration: If you're deploying to Cloudflare Workers, ensure that the wrangler.toml file is correctly set up with your account ID and other necessary configurations.

    • Supabase Integration: If the plugin interacts with Supabase, verify that your Supabase project is correctly set up and that the SUPABASE_URL and SUPABASE_KEY are accurately reflected in your .env file.

  9. Documentation and Further Assistance:

    For more detailed information or troubleshooting, refer to the readme.md and other documentation files within the repository. These resources often contain valuable insights and updates specific to the project.

By following these steps, you should be able to successfully run the text-conversation-rewards plugin locally and integrate it into your development workflow.

sshivaditya2019 commented 1 month ago

@UbiquityOS i have this code file https://github.com/ubiquity-os-marketplace/command-ask/blob/development/.github/workflows/update-configuration.yml but I am getting some errors with this ? this is actions.yml file https://github.com/ubiquity-os/action-deploy-plugin/blob/main/action.yml

ubiquity-os-beta[bot] commented 1 month ago

Hello! I understand you're encountering errors with your GitHub Actions workflows in the command-ask and action-deploy-plugin repositories. Let's walk through some common troubleshooting steps to help resolve these issues:

  1. Validate YAML Syntax:

    • Indentation: YAML is sensitive to spaces. Ensure consistent indentation throughout your .yml files.
    • Syntax Checking: Use an online YAML validator or integrated development environment (IDE) extensions to check for syntax errors.

    Example YAML Structure for GitHub Actions:

    name: Update Configuration
    
    on:
     push:
       branches:
         - main
    
    jobs:
     update-config:
       runs-on: ubuntu-latest
       steps:
         - name: Checkout Repository
           uses: actions/checkout@v4
    
         - name: Set Up Node.js
           uses: actions/setup-node@v4
           with:
             node-version: '16'
    
         - name: Install Dependencies
           run: yarn install
    
         - name: Execute Update Script
           run: yarn update-config
           env:
             SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
             SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
             OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
  2. Ensure Correct Action Configuration:

    • action.yml Structure: Verify that all necessary fields (name, description, inputs, runs) are correctly defined.

    Example action.yml:

    name: 'Deploy Plugin'
    description: 'Action to deploy the plugin to the marketplace'
    
    inputs:
     environment:
       description: 'Deployment environment'
       required: true
       default: 'production'
    
    runs:
     using: 'node16'
     main: 'dist/index.js'
  3. Check Environment Variables and Secrets:

    • Secrets Configuration: Ensure that all required secrets (e.g., SUPABASE_URL, SUPABASE_KEY, OPENAI_API_KEY) are correctly set in your repository settings.
    • Environment Variables: Confirm that environment variables are properly referenced using ${{ secrets.VARIABLE_NAME }}.
  4. Review Dependencies and Scripts:

    • package.json: Ensure all dependencies are listed correctly and compatible versions are used.
    • Build Scripts: Verify that your build and deployment scripts (e.g., yarn update-config) execute without errors locally before running them in the workflow.
  5. Examine GitHub Actions Logs:

    • Navigate to the Actions tab in your GitHub repository.
    • Select the failed workflow run to view detailed logs.
    • Identify the specific step where the error occurs and review the accompanying error messages for guidance.
  6. Common Issues to Look For:

    • Authentication Failures: Errors related to SUPABASE_KEY or OPENAI_API_KEY often stem from incorrect or missing secrets.
    • Dependency Conflicts: Ensure there are no version mismatches or conflicts in your dependencies that could cause installation failures.
    • Script Errors: Check your deployment scripts for runtime errors or incorrect commands.
  7. Utilize Similar Configurations from the Corpus:

    • Referencing the action-deploy-plugin's action.yml, ensure consistency in how actions are defined and invoked.
    • Ensure that any custom scripts or tools integrated into your workflows are correctly referenced and executable within the GitHub Actions environment.
  8. Example of Resolving a Common Error:

    Error: Error: Missing required input 'environment'.

    Cause: The workflow expects an input named environment which wasn't provided.

    Solution: Ensure that when triggering the action, the environment input is supplied either with a default value or explicitly during invocation.

    - name: Deploy Plugin
     uses: ubiquity-os/action-deploy-plugin@main
     with:
       environment: 'production'  # Ensure this input is provided

If after these steps you're still encountering issues, please provide the specific error messages or logs from the failed workflow runs. This will allow for a more targeted analysis and solution.


References from the Corpus:

Feel free to reach out with more details, and I'll be happy to assist further!

gentlementlegen commented 1 month ago

@ubiquityos how can I link my wallet and start working on issues within Ubiquity?

ubiquity-os-beta[bot] commented 1 month ago

To link your wallet and start working on issues within Ubiquity, please follow these steps:

  1. Register Your Wallet:

    Use the /wallet command followed by your wallet address to register it for payments. For example:

    /wallet your-wallet-address.eth

    Example:

    /wallet ubq.eth

    This command associates your wallet address with your GitHub account in the Ubiquity system.

  2. Assign Yourself to an Issue:

    Once your wallet is successfully registered, you can assign yourself to an issue using the /start command. Simply navigate to the issue you want to work on and execute:

    /start

    This will assign you to the issue, allowing you to begin your contribution.

  3. Additional Commands:

    • Check Your Wallet and Access Information:

      /query @ubiquibot

      This command returns your wallet address, access level, and multiplier information.

    • Unassign from an Issue:

      /stop

      Use this command if you need to unassign yourself from the current issue.

  4. Help and Support:

    If you need assistance or want to see all available commands, use:

    /help

    This will list all the commands you can use with UbiquityOS.

Notes:

By following these steps, you'll be able to link your wallet and actively participate in resolving issues within the Ubiquity community.