Giter Site home page Giter Site logo

chatgptassistantautoblogger's Introduction

How to autoblog using the ChatGPT Assistant's API

Firstly check out Income Stream Surfers on YouTube. There will be a few videos on how to use this script.

The best and easiest way to use this script is to use simplemode.py inside the simple folder. I can't seem to delete anything else from GitHub.

This is really powerful because we can use retrieval with some relevant files and upload them at the start of each thread, we can then use these files to create contextually relevant blog posts with very little effort, but with products and internal links already inside.

Step 1 - Products

Get a full list of your products, you can do this manually or you can use a script on your sitemap, or if you're on wordpress you can use a plugin to export all of your pages and images.

Step 2 - Keywords

I have simplified the keyword process, you just need a one column csv with the Keyword, column at the top, then whatever keywords you want below

You can put your niche into this into ChatGPT and ask for some stuff, give it some prompting, eventually it'll come out with something workable. You can even add your products to it to get better results.

Step 3 Internal links

Get a list of your internal links and put them in the same file as your images, this forms brandimagesandlinks.txt

Step 4 - OpenAI

You no longer have to change the script, simply change the config.json file to fit your business and your page tye.

Step 5 - The Content

The content comes out in a weird format, but you can easily use another script to format all of the content properly. You can use format.py (which uses OpenAI 0.28, so you'll have to install that version first) to do this en masse.

chatgptassistantautoblogger's People

Contributors

incomestreamsurfer 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  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  avatar  avatar  avatar  avatar

Watchers

 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

chatgptassistantautoblogger's Issues

running error

Hey ,

I am getting the following after watching your youtube? Haven't changed any files other than the API code and the XML's and Txt's

Any recommendation? ( i installed and reinstalled a few times with clean files and its the same )

C:\Users\xxxx\Desktop\AutoBlogger\chatpgtblogger>py testing3.py
Traceback (most recent call last):
File "C:\Users\xxxx\Desktop\AutoBlogger\chatpgtblogger\testing3.py", line 26, in
assistant = client.beta.assistants.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai\resources\beta\assistants\assistants.py", line 108, in create
return self._post(
^^^^^^^^^^^
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai_base_client.py", line 1200, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai_base_client.py", line 889, in request
return self._request(
^^^^^^^^^^^^^^
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai_base_client.py", line 980, in _request
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': 'Failed to index file: Unsupported file file-sAB6UDfZY0Uc7554S2y5YIsJ type: text/csv error_code: unhandled_mimetype', 'type': 'invalid_request_error', 'param': None, 'code': None}}

"2mentest.py", line 32 SyntaxError: invalid syntax

@ 10:45 of your video installation.

When test running: python 2mentest.py

File "2mentest.py", line 32
print(f"URL: {entry[0]}\nImage URL: {entry[1]}\nTitle: {entry[2]}\n")

SyntaxError: invalid syntax

Fails to run with error: TypeError: Assistants.create() got an unexpected keyword argument 'file_ids'

First of all, let me say that this is awesome work!

I encountered an issue with the autoblogger running on the latest OpenAI API.

The code it fails on

print("Creating OpenAI Assistant...")
assistant = client.beta.assistants.create(
    name="Content Creation Assistant",
    model="gpt-4-turbo-preview",
    instructions=f"",
    tools=[{"type": "retrieval"}, {"type": "code_interpreter"}],
    file_ids=[internal_links_file_id, content_plan_file_id, brand_plan_file_id, images_file_id]
)

It gives me the following error:
TypeError: Assistants.create() got an unexpected keyword argument 'file_ids'

It appears that the API was changed in version 1.21.0, and the file_ids parameter is no longer supported in the "Create assistant" method.

This is marked as legacy in the documentation:

API Reference Legacy: Create Assistant V1

API Reference Current: Create Assistant

As a workaround, downgrading to version 1.20.0 resolves the issue.

Repo is missing a License

This looks interesting. You can expand the number of people that will use this by adding a license. Ideally, a MIT or Apache, or BSD license. It'd be great if you could add a license to the repo.

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.