{"id":21880462,"url":"https://github.com/definetlynotai/llm_class","last_synced_at":"2025-07-21T07:31:45.744Z","repository":{"id":288963247,"uuid":"825770386","full_name":"DefinetlyNotAI/LLM_Class","owner":"DefinetlyNotAI","description":"Simple class python file that can determine toxicity, retrieve yahoo stocks and complete text for you, with super high customisation","archived":true,"fork":false,"pushed_at":"2024-07-27T20:25:05.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T18:37:59.686Z","etag":null,"topics":["class","complex","llm","python","stocks","text-completion","toxicity-classification","transformer-models","transformers","yahoo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DefinetlyNotAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-08T13:12:57.000Z","updated_at":"2025-04-04T11:19:38.000Z","dependencies_parsed_at":"2025-04-20T18:48:16.844Z","dependency_job_id":null,"html_url":"https://github.com/DefinetlyNotAI/LLM_Class","commit_stats":null,"previous_names":["definetlynotai/llm_class"],"tags_count":2,"template":false,"template_full_name":"DefinetlyNotAI/Repo_Template","purl":"pkg:github/DefinetlyNotAI/LLM_Class","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefinetlyNotAI%2FLLM_Class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefinetlyNotAI%2FLLM_Class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefinetlyNotAI%2FLLM_Class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefinetlyNotAI%2FLLM_Class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DefinetlyNotAI","download_url":"https://codeload.github.com/DefinetlyNotAI/LLM_Class/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefinetlyNotAI%2FLLM_Class/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266261117,"owners_count":23901283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["class","complex","llm","python","stocks","text-completion","toxicity-classification","transformer-models","transformers","yahoo"],"created_at":"2024-11-28T09:13:58.592Z","updated_at":"2025-07-21T07:31:45.399Z","avatar_url":"https://github.com/DefinetlyNotAI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLM_Class 📎\n\nWelcome to `LLM_Class` 🌐,\nCrafted with python and Hugging Face 🐍, by DefinetlyNotAI 🤗.\nThis comprehensive guide is here to equip you with everything you need to use `LLM_Class` effectively.\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/LLM_Class/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/DefinetlyNotAI/LLM_Class\" alt=\"GitHub Issues\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/LLM_Class/tags\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/DefinetlyNotAI/LLM_Class\" alt=\"GitHub Tag\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/LLM_Class/graphs/commit-activity\"\u003e\u003cimg src=\"https://img.shields.io/github/commit-activity/t/DefinetlyNotAI/LLM_Class\" alt=\"GitHub Commit Activity\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/LLM_Class/languages\"\u003e\u003cimg src=\"https://img.shields.io/github/languages/count/DefinetlyNotAI/LLM_Class\" alt=\"GitHub Language Count\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/LLM_Class/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/check-runs/DefinetlyNotAI/LLM_Class/main\" alt=\"GitHub Branch Check Runs\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/LLM_Class\"\u003e\u003cimg src=\"https://img.shields.io/github/repo-size/DefinetlyNotAI/LLM_Class\" alt=\"GitHub Repo Size\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# LLM_Class\n\nThe `LLM_Class` is a Python class designed to provide financial market insights through\nvarious functionalities including retrieving stock news,\nfetching historical stock data, generating text based on prompts,\nand analyzing the sentiment of given texts as well as act like a basic language model.\nIt leverages external libraries such as `requests`, `BeautifulSoup`, `yfinance`, and `transformers` \nfrom Hugging Face to perform these tasks efficiently.\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n- You have installed Python 3.8 or later.\n- You have installed the required Python packages from the [requirements.ps1](requirements.ps1) file.\n- You are using windows\n- You have at least 6GB of Storage available\n- You have a dedicated nvidea GPU supporting CUDA 11.8\n\n## Installation\n\nIf you plan to modify or extend the functionality of the `LLM_Class`, clone the repository and install the required packages locally.\n\n```bash\ngit clone https://github.com/DefinetlyNotAI/LLM_Class.git\ncd LLM_Class\n.\\requirements.ps1\n```\n\n## Usage\n\n### Initialization\n\nFirst, import the `LLM_Class` class and create an instance of it:\n\n```python\nfrom LLM import LLM\n\nllm = LLM()\n```\n\n### Getting Stock News\n\nTo retrieve the latest news headlines for a specific stock ticker, use the `get_stock_news` method:\n\n```python\nnews_headlines = llm.get_stock_news('AAPL')\nprint(\"News Headlines:\", news_headlines)\n```\n\nThis is the most unsupported feature of the `LLM_Class`.\n\n### Fetching Historical Stock Data\n\nTo fetch historical stock data for a given ticker symbol over the past year, use the `get_stock_data` method:\n\n```python\nstock_data = llm.get_stock_data('AAPL')\nprint(stock_data)\n```\n\n### Generating Text\n\nTo generate text based on a given prompt using a customizable text generation pipeline, \nuse the `generate_text` method:\n\n```python\ngenerated_text = llm.generate_text(prompt=\"What is the future of AI in finance?\")\nprint(generated_text)\n```\n\n### Analyzing Sentiment\n\nTo analyze the sentiment of a given text, use the `analyze_sentiment` method:\n\n```python\nsentiment = llm.analyze_sentiment(text=\"The stock market is volatile today.\")\nprint(sentiment)\n```\n\n## Contributing\n\nContributions are what make the open-source community such an amazing place to learn,\ninspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nBut don't hesitate to [open an Issue](https://github.com/DefinetlyNotAI/LLM_Class/issues) \nif you have any questions or encounter any issues.\n\nMost importantly, **don't forget to follow us!** and read our [Contributing Guide](CONTRIBUTING.md).\n\n## License\n\nDistributed under the MIT License. See [LICENSE](LICENSE) for more information.\n\n## Contact\n\nShahm Najeeb - Nirt_12023@outlook.com\n\nProject Link: [https://github.com/DefinetlyNotAI/LLM_Class](https://github.com/DefinetlyNotAI/LLM_Class)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefinetlynotai%2Fllm_class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefinetlynotai%2Fllm_class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefinetlynotai%2Fllm_class/lists"}