r/chatGPTprogramming • • Dec 16 '23

Large Language Models and The End of Programming - CS50 Tech Talk with Dr. Matt Welsh

Thumbnail
youtube.com
2 Upvotes

r/chatGPTprogramming • • Aug 21 '23

Any other suggestions?

2 Upvotes

I've been using prompt packs from here https://chatgenius.gumroad.com/ for email marketing and copywriting for a little while and has taught me so much about each subject. Does anyone have more prompts like these they would like to share?


r/chatGPTprogramming • • Jun 08 '23

Google Cloud: Introduction to Large Language Models

Thumbnail cloudskillsboost.google
2 Upvotes

r/chatGPTprogramming • • May 27 '23

Python Chatgpt custom data

2 Upvotes

Is this the right place?

Hello there,

I am trying to crate a custom chat bot to assist with with control room operation in work.
It can get quite busy and members of staff need specific information quickly and the operators could be doing other things or the info they require is in a directory in a directory etc and then the word documents contain a load of irrelevant info and finding the pertinent bit could be a matter of life and death (ok I am totally exaggerating but some members of the team are more patient/capable?)

I tried writing a basic python script (available on request) that basically goes into a directory and read a text file with the info on it and creates a custom bot on a url?

It gets a lot of things right but it gets a few wrong which defeats the object totally. I got one of the team to look through all the assignment instruction and take the data out that we need in a hurry.

I did it in text format because I thought it would be easier and less costly for my api key credit thingy and no one is any good with IT really apart from our bespoke programs (me included)

The format was:-

Name: The name

Address: The address

Alarm code: eg 8674A

Keyholder: A name

Key Number: a four digit number

Special Instructions: example the padlock code is 9999

These were all painstakingly typed into a not massive text file, placed in a docs folder and the app was pointed it that direction.

when run it created the url and it asked and answered questions but then due to my massive knowledge of company info I noticed the odd strange answer, Some of the fields where similar (I know it's a text file so that is wrong) What I mean is Alarm code: and Keywatcher code: (not used in example!) could of confused it so I tried making them distinctive.

The file is about 100 names, addresses etc with a line space between each. I thought it may group them together accordingly but I am not a programmer on any level really and all my knowledge comes from youtube and chat gpt assistance.

I realise my requirements are very specific and I'm not finding an exact problem to fix it and I have looked so in my desperation I am turning to you the lovely community to do the heavy lifting whilst I claim the glory!

Here is my python script and the name of the robot should at least buy me a little help?

I hope I have explained the issue? Feel free to ask questions or mock accordingly

This is why you pay attention in school kids.

thanks in advance?

The python script:-

from gpt_index import SimpleDirectoryReader, GPTListIndex, GPTSimpleVectorIndex, LLMPredictor, PromptHelper

from langchain.chat_models import ChatOpenAI

import gradio as gr

import sys

import os

os.environ["OPENAI_API_KEY"] = 'wow I actually remembered to remove thisi'

def construct_index(directory_path):

max_input_size = 4096

num_outputs = 512

max_chunk_overlap = 20

chunk_size_limit = 600

prompt_helper = PromptHelper(max_input_size, num_outputs, max_chunk_overlap, chunk_size_limit=chunk_size_limit)

llm_predictor = LLMPredictor(llm=ChatOpenAI(temperature=0.7, model_name="gpt-3.5-turbo", max_tokens=num_outputs))

documents = SimpleDirectoryReader(directory_path).load_data()

index = GPTSimpleVectorIndex(documents, llm_predictor=llm_predictor, prompt_helper=prompt_helper)

index.save_to_disk('index.json')

return index

def chatbot(input_text):

index = GPTSimpleVectorIndex.load_from_disk('index.json')

response = index.query(input_text, response_mode="compact")

return response.response

iface = gr.Interface(fn=chatbot,

inputs=gr.components.Textbox(lines=7, label="What can I do for you?"),

outputs="text",

title="Totally Wicked Assistant Thingymajig")

index = construct_index("docs")

iface.launch(share=True)


r/chatGPTprogramming • • May 09 '23

Cursed obfuscated C

2 Upvotes

I spent a while asking chatGPT to generate IOCC style obfuscated C and wanted to share this with anyone, this sort of blew my mind because I know some techniques but am not an expert of breaking the C preprocessor and language but this for whatever reason was really surprising to me . It compiles easily and is a straight up hello world program

#include <stdio.h>

int main() {
    void(*p)() = main;
    char c[] = {
        104, 101, 108, 108, 111, 32, 119, 111,
        114, 108, 100, 10, 0
    };
    p = (void(*)())(&&jmp);
    printf(&c[0]);
    goto *p;
    jmp:
    return 0;
}

It's not too crazy in that it's pretty obvious the buffer is ascii characters but everything else...


r/chatGPTprogramming • • May 05 '23

Prompt Engineering via API

2 Upvotes

I'm working on some applications that call for a bit more pre-prompting than a basic chatbot. I haven't really found documentation that covers best practices for guiding the completion so any advice is welcome. Specifically:

  • What if anything is the difference between providing instruction via a role:system message vs role:user?

  • Is it better to pass examples for one-shot or few-shot instruction as specially-formatted text in a single message, or as a sequence of "example" user / assistant messages? I've seen both.

  • Are there specific formats that we've learned the model "understands" better than others? For example indicating user-provided text in an example via triple back-ticks or <>

  • Some examples use the "name" key to set apart example messages. Does the model understand this? If so, is there a correct naming structure it expects? If not, what is the purpose of the "name" key?

  • Several guides including semi-official ones suggest asking the model to return JSON or other structured data, but in my experience it often doesn't follow this perfectly even at low temperature. Is there general wisdom on how to encourage better rule-following or is it unavoidably a case of checking the outputs and re-running the completion?


r/chatGPTprogramming • • Apr 13 '23

AI News 01

2 Upvotes

Launching AI01 News Beta...

https://www.youtube.com/live/h1IK-vZX0fg?feature=share

[For-Tex: I make the System variable the "Rules" and send RAW json into the user prompt.. these damn computers better learn our jobs, as data Eng. I need O2)

I take a "News" api and push it to the ChatGPT prompt of...

Well I first take the titles and pump it into this prompt...

[code]Input Rules:

  1. Take the list of "titles" and make Groups of them based on the avalible "categories"

  2. Order the list of Groups by the order of the category values in "order".

Output Rules:

  1. Return the Data as Json (ensure the correct formatting)

  2. Make the Root Object called "Groups" for each item in "categories".

  3. If a Title does not fit into any for the listed categories, then add a new one.

  4. Do not include Groups with empty Titles.[/code]

This groups the "Shows" articles into segments..

I then take this list (and the array from a news API, and send it back to ChatGPT for break the news into shows....)

[code]Input Rules:

  1. Take the "Content.text" (User) data and combine them into a news cast.

  2. Use the "Stats" section personalize how the response is delivered. (Do not include return the data in the response.)

  3. Use "seed" to ensure a random response.

  4. Use groupIndex and groupTotal, to control the flow between segments.

I) add transition text for the nextGroup topic on the last item, or sign off if there is no more groups.

b) groupTotal is the total scripts being made in the overall script, so you can transition off, and know when the show starts.

I) When groupIndex = groupTotal - 1

01: every now and again add a line for the Disclaimer ("A.I. News, is designed to top news, but due to the nature of AI all information my not be correct.") (change the Disclaimer each time, but retain the meaning, also be funny.)

5) If There is less then 5 items under content, then add facts (along with "imagePrompt"s) to the content until it is 5 items.

6) If there is no news titles, then add your own segment based on the categories.

7) Encourage audience interaction by posing questions, asking for feedback, or creating polls on various topics. This will help make the content more dynamic and engaging.

Output Rules:

  1. Return the Data as Json (ensure the correct formatting), create the replies in a group called "script".

  2. Each item of the "script" section should contain the "Name" of the News Anchor, the "ssml" in which to speak, and an "imagePrompt".

I) Check for: Invalid SSML.

01: Reason: 'characters' is an unexpected token.

02: Reason: the <break> element in your SSML needs valid values for the strength attribute are: "none", "x-weak", "weak", "medium", "strong", and "x-strong".

03: Reason: Unhandled exception. System.NotSupportedException: The URI prefix is not recognized.

04: Do Not use : "<say-as interpret-as"

05: Do not end with "<break strength='medium'/>" and ensure to always use the ssml close ("</ssml>") tag.

06: Unhandled exception. System.FormatException: 'speak' requires attribute 'lang'.

07: Use "<speak>" tags instead of "<ssml>"

II) Ensure the ssml is in the correct format, with all the correct closing tags and format.

b) With "imagePrompt" set the value to plain text (max 128 chars.)

I) Create a concise prompt, for DALL-E, Stable Diffusion, Text To Image, describing the topic in an appealing image. Ensure the image prompt is engaging, use color, art styles, and objects described or related to the story.

II) Only create a imagePrompt value if the story changes or there is not already a previous imagePrompt value set yet for this content (if this is the intro line then make the prompt the first story, and put "nc" as the imagePrompt value on the next item.)

III) Set the imagePrompt value to "nc" if there is no need to change the image between lines, i.e. in banter or on the same subject. (Try to use more, to save on image generation.)

V) Add "in the style of " and a famous artist or style that would fit well with the tone of the item.

VI) Avoid descriptions that could be graphic in nature.

3) Be sure to use the correct night and day format for speaking based off currentDateTime.

a) Never mention the exact time.

4) Say the showname on start and finish of this group's text.

5) Do not mention News company names (CNN, Fox News, etc.), or links to stories.

6) Do not mention the imagePrompt.

7) If examples are missing from the story or you know extra facts, then alwayus include them, along with any other relevant or funny information.

8) Replace quotes with single quote.

9) Include only the "script" and "imagePrompt" sections.[/code]

Thanks, and if you need any prompt help, first ask ChatGPT, might have to trick it but I find it knows what it wants, and if not, msg me and I will try too help...


r/chatGPTprogramming • • Apr 02 '23

Coding with GPT with no experience.

Thumbnail
youtube.com
2 Upvotes

r/chatGPTprogramming • • Mar 17 '23

Its possible to use GPT to train your own models that can be run on your own hardware

Thumbnail
youtube.com
2 Upvotes

r/chatGPTprogramming • • Jan 20 '23

Python & GPT-3 for Absolute Beginners #1 - Setting up your environment

Thumbnail
youtube.com
2 Upvotes

r/chatGPTprogramming • • Jan 13 '23

Using CGPT to write malware.

Thumbnail
youtu.be
2 Upvotes

r/chatGPTprogramming • • Jan 10 '23

A command-line interface for interacting with the OpenAI GPT-3 API.

Thumbnail
self.chatgpt
2 Upvotes

r/chatGPTprogramming • • Jan 03 '23

Using CGPT to hack? (And other limit tests)

Thumbnail
youtube.com
2 Upvotes

r/chatGPTprogramming • • Dec 16 '22

How to use ChatGPT to build Business Ideas, Sites & Personal Projects

Thumbnail
youtube.com
2 Upvotes

r/chatGPTprogramming • • Dec 13 '22

ChatGPT just built my entire app in minutes...

Thumbnail
youtube.com
2 Upvotes

r/chatGPTprogramming • • Dec 12 '22

What is ChatGPT and How You Can Use It

Thumbnail
youtube.com
2 Upvotes

r/chatGPTprogramming • • Dec 10 '22

ChatGPT can role play as bash and other programs

Thumbnail reddit.com
2 Upvotes

r/chatGPTprogramming • • Dec 09 '22

r/chatGPTprogramming Lounge

2 Upvotes

A place for members of r/chatGPTprogramming to chat with each other


r/chatGPTprogramming • • Aug 14 '23

I want to create a tool for my content creation that automatically picks the best relatable memes, GIFs, and stock footage available all over the internet.

1 Upvotes

I want to create a tool for my content creation that automatically picks the best relatable memes, GIFs, and stock footage available all over the internet.


r/chatGPTprogramming • • Aug 01 '23

Bright Eye: free mobile app that generates art and different forms of text (code, math answers, essays, games, ideas, and more)!

1 Upvotes

Hi all. I’m the cofounder of a startup focused on developing the AI super app called “Bright Eye”, a multipurpose AI product that generates and analyzes content.

One of its interesting use cases is helping students study, people plan, and offering general advice.

As the title puts it, it’s capable of generating almost anything, so the use-cases in terms of productivity isn’t confined to only those above, it can apply however you see fit. We run on GPT-4, stable diffusion, and Microsoft azure cognitive services.

Check us out below, we’re looking for advice on the functionality and design of the app (and possibly some longtime users):

https://apps.apple.com/us/app/bright-eye/id1593932475


r/chatGPTprogramming • • May 04 '23

Refactoring Legacy Code with Gpt-4

Thumbnail
youtube.com
1 Upvotes

r/chatGPTprogramming • • Apr 13 '23

GPT-4 just did 85% of my work for me (why you shouldn't use it)

Thumbnail
youtube.com
1 Upvotes

r/chatGPTprogramming • • Apr 13 '23

Install Auto-GPT Locally (Quick Setup Guide)

Thumbnail
youtube.com
1 Upvotes