Skip to content

Instantly share code, notes, and snippets.

@blackwhites
blackwhites / agent loop
Created March 10, 2025 13:48 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@blackwhites
blackwhites / app.py
Created September 3, 2024 06:12 — forked from nicekate/app.py
支持 github models的Streamlit应用,可以选择GPT-4o或4o mini,文字或图片对话。
import os
import base64
import streamlit as st
from openai import OpenAI
# 设置环境变量和OpenAI客户端
token = os.environ["GITHUB_TOKEN"]
endpoint = "https://models.inference.ai.azure.com"
model_name = st.sidebar.selectbox("选择模型:", ["gpt-4o", "gpt-4o-mini"])
@blackwhites
blackwhites / README.md
Created April 22, 2024 15:35 — forked from disler/README.md
Use these Prompt Chains to build HIGH QUALITY AI Agents (Agentic Building Blocks)

Setup

  1. Create a new directory with these three files (requirements.txt, main.py, README.md)
  2. python -m venv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt
  5. python main.py
  6. Update main() to run the example prompt chains
import requests
import shutil
import camelot.io as camelot
import os
from PyPDF2 import PdfFileReader, PdfFileWriter
for year in range(2011,2017):
url = f'https://files.dep.state.pa.us/Waste/Recycling/RecyclingPortalFiles/Documents/{year}_Recycling_Report.pdf'
@blackwhites
blackwhites / finetune_llama_v2.py
Created August 22, 2023 07:49 — forked from younesbelkada/finetune_llama_v2.py
Fine tune Llama v2 models on Guanaco Dataset
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@blackwhites
blackwhites / bot.py
Created April 10, 2023 08:01 — forked from xinqiu/bot.py
Creating a private data QA bot entirely using the open-source LLM project
from langchain import PromptTemplate, LLMChain
from langchain.document_loaders import UnstructuredHTMLLoader
from langchain.embeddings import LlamaCppEmbeddings
from langchain.llms import LlamaCpp
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.vectorstores.faiss import FAISS
loader = UnstructuredHTMLLoader("langchain/docs/_build/html/index.html")
embedding = LlamaCppEmbeddings(model_path="path/models/ggml-model-q4_0.bin")
llm = LlamaCpp(model_path="path/models/ggml-model-q4_0.bin")
@blackwhites
blackwhites / chatpdf-zh.ipynb
Created March 25, 2023 07:24 — forked from ninehills/chatpdf-zh.ipynb
ChatPDF-zh.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blackwhites
blackwhites / MakingPrompt.md
Created December 14, 2022 03:45 — forked from hyuki/MakingPrompt.md
ChatGPTを使って画像生成AIのプロンプトを生成する

ChatGPTを使って画像生成AIのプロンプトを生成する

image

image

以下の内容はMarkdownとして体裁を整える以外、修正は加えていません。

質問(結城浩)

@blackwhites
blackwhites / ai-writing-tools.md
Created December 14, 2022 03:43 — forked from rowe-morehouse/ai-writing-tools.md
🔥 List of AI Writing Tools: AI Writing Assistant, AI Chat, Automatic Content Generation, Idea Recommendation, Paraphrasing, Summarizing, Outlining, SEO Metas, Grammar Check, Tone Check, Sales Email Customization
@blackwhites
blackwhites / world_cup_2022_dataset_extract_OpenAI_ChatGPT.md
Created December 14, 2022 03:37 — forked from wey-gu/world_cup_2022_dataset_extract_OpenAI_ChatGPT.md
Extract Data from wikipedia for World Cup 2022 Dataset