How can i feed a whole wiki page to model&

Hi, i’m making chatbot for business and i need to feed to chatbot whole wiki page with different information and instructions? how can i do it

Welcome to the community.

You are asking a lot without sounding like you have done much research. But giving you the benefit of the doubt, here are a few pointers:

You will be using the chat or the completions endpoint on the API.

You can only process 4000 tokens at a time. A token is about 1.2 words or 4 characters. Although those are just rules of thumb I use.

Tokens are consumed with the sum of input and output. So if your wiki page is longer than 4000 tokens and/or you are looking for a large output then you are going to have to find strategies to do your work in steps.

The API has no memory. Nor does ChatGPT. It looks like it remembers things. But it’s only because the history is included in each request. That inclusion of history also consumes your 4000 tokens.

You can’t just include the link to the page in your prompt. You will have to suck the page in and parse it into a suitable format for the model to process. I’ve never tried but it will probably read HTML okay. But HTML is bloated with tags. Which will consume your tokens. I parse text to markdown and get markdown back which works nicely.

Good luck!

1 Like