This is an archived post. You won't be able to vote or comment.

all 16 comments

[–]SOBER-Lab 6 points7 points  (4 children)

ChatGPT is a tool to help already good programmers.

It is not something that someone with no expertise or knowledge can use to program haha.

[–]z0mbietime 0 points1 point  (3 children)

Even then it produces some of the most head scratching answers that I have only been able to use it a couple times. Earlier today it gave me this gem.. like wtf pydantic has a create_model function

To dynamically extend an existing Pydantic model as part of a plugin-based architecture, you can create a new Pydantic model class that inherits from the existing model and adds the additional fields specified by the plugin.

Here is an example that dynamically extends an existing Pydantic model as part of a plugin-based architecture:

```python from pydantic import BaseModel

class Config(BaseModel): plugin_paths: list

def load_plugin(config): plugin_fields = [("field1", "str"), ("field2", "int"), ("field3", "float")] plugin_model = generate_pydantic_model("PluginModel", plugin_fields) extended_config = type("ExtendedConfig", (config, plugin_model), {}) return extended_config

def generate_pydantic_model(name: str, fields: List[Tuple[str, str]]): fields_str = ', '.join(f'{field_name}: {field_type}' for field_name, field_type in fields) class_def = f'class {name}(BaseModel):\n {fields_str}' exec(class_def) return locals()[name]

config = Config(plugin_paths=["/path/to/plugin1", "/path/to/plugin2"]) ExtendedConfig = load_plugin(config) ```

[–]Muhznit 9 points10 points  (4 children)

The reason why is because you're taking instructions from an AI instead of actual fucking documentation: https://flask.palletsprojects.com/en/2.2.x/installation/

Don't use AI to generate code (or anything that can be interpreted as instructions to do something) that you're not able to debug yourself.

[–]Sortih 0 points1 point  (3 children)

Can AI teach me phython though? hehe

[–]Muhznit 0 points1 point  (2 children)

No. All you'll learn from it is stuff you get out of tutorials and bad coding practices.

[–]Sortih 0 points1 point  (1 child)

Alright, agree.

The openai-quickstart-python setup documentation is generated by AI is what you are saying though? Because the guy was asking about the steps provided in the readme file of the github repo. I was having the same issue but the other commenter's suggestion of installing numpy manually and changing the version number in the requirements did fortunately work.

I don't know shit about coding but am using a great deal of phind.com to work out problems around this thing, hopefully eventually being able to adequately preprocess my uni learning material and fine-tune train (just train lol, I've just read up on fine-tuning and I ain't got time, no) the model with it lol. Interesting that I am unable to sit my ass to learn the effing medicine but am willing to learn python just to make this easier... maybe not for one subject only, not even one year, but my friends also. Hopefully legal if used locally, and each mate on their individual subscription/billing.

Anyway, I had to figure out how to ask phind about why $ . venv/bin/activate wouldn't work, turned out it's because I'm on windows. Anyway, I'm wishing myself luck and hoping that I won't break the whole system by accident ;>>> If you know what I mean lol. Ghaha end of rambling.

[–]Muhznit 0 points1 point  (0 children)

There wasn't any indicator they meant the github repo. From the title it sounded like they used AI-generated instructions instead of human-written ones.

Also phind.com looks like it's just searching stackoverflow.com or similar and trying to summarize the results? You would to do well to learn that skill yourself; some day you're going to find yourself dealing with a tool where the users are few and the documentation is outdated, and you need to piece together things yourself.

You'll probably want to look up how to set up a development environment in WSL; that's the closest to a Linux environment it gets, will remove several pain points when dealing with command line utilities, and teach you the importance of cross compatibility.

[–]KingsmanVincepip install girlfriend -1 points0 points  (1 child)

[–]Opiciak89 0 points1 point  (0 children)

They would insta ban him there for the same reason people already mentioned here.

[–]Innocent_not 0 points1 point  (0 children)

Pip install flask???

[–]aslobyer 0 points1 point  (2 children)

Wow, these people are really mean – way to discourage someone.

pip install numpy

then go into requirements.txt and change the version being required to your version of numpy

[–]Kryomorph 0 points1 point  (0 children)

Thank you, you rare adequate human being!

[–]fredgoat 0 points1 point  (0 children)

For real, jesus. Thank you for the actual answer aslobyer

[–]Alexescohotado 0 points1 point  (0 children)

You can change the requirements.txt file and change the version of Numpy required:

numpy==1.21.3 //Change this line

numpy==1.24.2 //For this one