openai / chatgpt-retrieval-plugin

The ChatGPT Retrieval Plugin lets you easily find personal or work documents by asking questions in natural language.
MIT License
21.06k stars 3.68k forks source link

Projects Crazy #445

Open jymmyjr opened 2 months ago

jymmyjr commented 2 months ago

!/bin/bash

Clone the repository

git clone https://github.com/openai/chatgpt-retrieval-plugin.git cd chatgpt-retrieval-plugin

Create a new branch

git checkout -b fix-issue-446

Set up the environment

if ! python3.10 --version &> /dev/null then echo "Python 3.10 not found. Please install Python 3.10 before proceeding." exit fi

pip install poetry poetry env use python3.10 poetry shell poetry install

Set environment variables (update these values accordingly)

export DATASTORE="your_datastore" export BEARER_TOKEN="your_bearer_token" export OPENAI_API_KEY="your_openai_api_key" export EMBEDDING_DIMENSION=256 export EMBEDDING_MODEL="text-embedding-3-large"

Additional Azure-related variables (if applicable)

export OPENAI_API_BASE="https://.openai.azure.com/" export OPENAI_API_TYPE="azure" export OPENAI_EMBEDDINGMODEL_DEPLOYMENTID="your_deployment_id" export OPENAI_METADATA_EXTRACTIONMODEL_DEPLOYMENTID="your_metadata_deployment_id" export OPENAI_COMPLETIONMODEL_DEPLOYMENTID="your_completion_deployment_id" export OPENAI_EMBEDDING_BATCH_SIZE=1

Notify that the environment is set up

echo "Environment setup complete. Ready to fix issue #446."

Run tests (optional, example)

poetry run pytest

Commit and push the changes

git add . git commit -m "Fix issue #446: [brief description of the fix]" git push origin fix-issue-446

Create a pull request (GitHub CLI required)

gh pr create --title "Fix issue #446" --body "This PR addresses issue #446 by [description of what was fixed]."

echo "Pull request created. Please review and merge."