Code Monkey home page Code Monkey logo

confluence-gpt's Introduction

Confluence GPT

This repository contains a Python script that uses ChatGPT to generate Confluence pages automatically. You can use this script to quickly create new pages by providing input text and customizing page elements such as the title, formatting, and content. The generated content can be published promptly to Confluence using the python APIs.

Disclaimer

I am not affiliated with OpenAI or the ChatGPT product. This repository is not endorsed by or affiliated with OpenAI or ChatGPT. This is a personal project just for research purposes, to discover the capabilities of the new ChatGPT model released recently by OpenAI.

Usage

To use the create_page.py script, you will need to have the atlassian-python-api and revChatGPT libraries installed. You can install this library using pip install -r requirements.txt.

Once you have installed the required libraries and set the environment variables, use python create_page.py by providing the following informations when asked:

  • Your Confluence URL, username, and password: these will be used to authenticate to Confluence.
  • The input text that will be used as the basis for the Confluence page. This input text will be provided to ChatGPT to generate the page content. The desired title for the Confluence page. Any additional page elements, such as formatting or attachments, that you want to include in the page.

The script will use this input to authenticate to Confluence, generate the page content using ChatGPT, and create a new Confluence page with the provided title and additional elements. The newly created page will be published to Confluence and can be accessed from your Confluence dashboard.

To use the create_page.py script, you will need to set the following environment variables:

  • JIRA_URL: The URL for your JIRA instance.
  • JIRA_USER: Your JIRA username.
  • JIRA_API_TOKEN: Your JIRA API token. You can generate an API token by following the instructions here.
  • OPENAI_ACCESS_TOKEN: OpenAI access token used to authenticate to ChatGPT. In order to retrieve the access token, go to https://chat.openai.com/api/auth/session and get the value of "accessToken" variable.

confluence-gpt's People

Contributors

reidemeister94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

confluence-gpt's Issues

openai.error.InvalidRequestError: That model does not exist

Did OpenAI shutdown or change something? Got below error when running the code.

2023-02-23 10:44:01,464 - openai - DEBUG - message='OpenAI API response' path=https://api.openai.com/v1/engines/text-chat-davinci-002-20230126/completions processing_ms=None request_id=f9f36e0cc30e11a8aa2b5ec82aa2ce1d response_code=404
2023-02-23 10:44:01,466 - openai - INFO - error_code=None error_message='That model does not exist' error_param=None error_type=invalid_request_error message='OpenAI API error received' stream_error=False
Traceback (most recent call last):
File "create_page.py", line 103, in
main()
File "create_page.py", line 83, in main
chat_response = chatbot.ask(chat_message_content)["choices"][0]["text"]
File "C:\Users\xwei\Anaconda3\lib\site-packages\revChatGPT\Official.py", line 107, in ask
completion = self._get_completion(
File "C:\Users\xwei\Anaconda3\lib\site-packages\revChatGPT\Official.py", line 47, in _get_completion
return openai.Completion.create(
File "C:\Users\xwei\Anaconda3\lib\site-packages\openai\api_resources\completion.py", line 25, in create
return super().create(*args, **kwargs)
File "C:\Users\xwei\Anaconda3\lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "C:\Users\xwei\Anaconda3\lib\site-packages\openai\api_requestor.py", line 227, in request
resp, got_stream = self._interpret_response(result, stream)
File "C:\Users\xwei\Anaconda3\lib\site-packages\openai\api_requestor.py", line 620, in _interpret_response
self._interpret_response_line(
File "C:\Users\xwei\Anaconda3\lib\site-packages\openai\api_requestor.py", line 680, in _interpret_response_line
raise self.handle_error_response(
openai.error.InvalidRequestError: That model does not exist

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.