paulwong

#

智谱文字变图像模型zai-org/GLM-Image

开源,可在huggingface下载,模型id:zai-org/GLM-Image https://huggingface.co/zai-org/GLM-Image
生成文字不乱码

posted @ 2026-01-25 23:26 paulwong 阅读(25) | 评论 (0)编辑 收藏

Agent案例 - 制作ppt


输入提示词
4句提示词:
第一,你扮演世界上最顶尖的商业演示设计专家和视觉的传达顾问。 
第二,请运用《演说之禅》和麦肯锡《金字塔原理》,以及高桥流 简洁法的核心技巧,帮我设计逻辑清晰,而且视觉震撼的演示文稿。
第三,我会详细描述我的演示目标、演示目的、演示目标受众、演示的核心内容,时间限制以及现有的素材。
第四,请给我一个可以立即执行到个性化设计方案,一定要具体实用,别说废话。

选择Gemini-pro3,发送。

输入内容
示目标:希望目标受众在认知和行动上产生以下转变,从对AI的焦虑与替代恐惧,转变为将其视为能力放大器与战略伙伴。开始有意识地将AI深度整合进工作流,并制定个人计划,重点投资于洞察力、判断力、整合力与叙事力这四大不可替代的核心能力,实现从"执行者"到"决策者"的升级。
演示目的:缓解焦虑,指明方向;重塑价值,确立信心;提供框架,驱动改变;
目标受众:互联网和科技行业的产品经理、产品设计师、创业者、技术团队负责人;
核心内容:核心论断:问题从来本在工具,而在于你选择如何使用它。AI是能力的放大器,而非替代品。
关键框架:
现状定位:我们正处在从"推理者"向"代理"过渡的拐点,对"会用Agent的人"要求更高。
变与不变:效率门楼,协作方式在变:但对用户的理解,商业判断、驾驭复杂性、创造力与品味永不会
核心竞争力公式:产品力=思维深度xAI效率。
思维深度为零,一切归零。
四大不可替代能力:洞察力、判断力、整合力、叙事力。
三段式实践路径:短期掌握协作,中期深化专业,长期构建系统思维。
终极愿景:未来的产品经理应是思想者、决策者、协作者、创造者的集合体。最终的竞争,是"会用机器且拥有深度思维的人*之间的竞争。
时间限制:理想的演讲时间约为30-45分钟:

输入提示词,选择nano-banana,发送
这是我今天要演示的内容,请根据内容帮我生成一份PPT演示文稿,我给你的设计提示词是:"Cinematic lighting, hyper-realistic, human hand shaking robot hand, warm tone"(用于P3); "Minimalist style, a lighthouse in the dark ocean, vector art"(用于P8洞察力).



posted @ 2026-01-25 22:21 paulwong 阅读(33) | 评论 (0)编辑 收藏

通过api调用vl模型


import os,base64
from openai import OpenAI

client = OpenAI(
    api_key='xxx',
    base_url="https://dashscope.aliyuncs.com/compatible-mode/v1"
)

def encode_image(image_path):
    with open(image_path,"rb") as image_file:
        return base64.b64encode(image_file.read()).decode("utf-8")

result = []
for file_name in ["food1.png","food2.png","food3.png"]:
    image_path = os.path.join(os.path.dirname(__file__),file_name)
    completion = client.chat.completions.create(
        model="qwen-vl-max-latest",
        messages=[
            {
                "role""system",
                "content": [{"type":"text","text":"You are a helpful assistant."}]
            },
            {
                "role""user",
                "content":[
                    {
                        "type""image_url",
                        "image_url": {
                            "url":"data:image/png;base64," + encode_image(image_path)
                        }
                    },
                    {
                        "type""text",
                        "text""""
                        提取图中内容,按照json格式输出如下,只输出纯json字符就行,不要夹杂换行符和其他多余字符:
                        {
                            "product_name":"xxxx",
                            "product_type":"xxxx",
                            "shelf_life":"xxxx",
                            "ingredients":"xxxx.",
                            "product_standard_code":"xxxx",
                            "storage_conditions":"xxxx",
                            "food_production_license_number":"xxxx",
                            "production_date":"xxxx",
                            "manufacturer":"xxxx",
                            "address":"xXxx",
                            "phone":"xxxx",
                            "fax":"xXXX"
                        }
                        
"""
                    }
                ]
            }
        ]
    )

    result.append(completion.choices[0].message.content)

print(result)




posted @ 2026-01-25 17:20 paulwong 阅读(29) | 评论 (0)编辑 收藏

Claude skill 资源

安装方法
/plugin marketplace add anthropics/skills anthropics/claude-plugins-official

awesome-claude-skills
https://github.com/ComposioHQ/awesome-claude-skills/tree/master

Claude Code Plugins Directory
https://github.com/anthropics/claude-plugins-official

Skills
https://github.com/anthropics/skills

Awesome Claude Code Subagents
https://github.com/VoltAgent/awesome-claude-code-subagents/blob/main/README.md

agent-skills-examples
https://github.com/tech-shrimp/agent-skills-examples/tree/main/字幕转markdown

THE OPEN AGENT SKILLS ECOSYSTEM
https://skills.sh

skills.marketplace
https://skillsmp.com/zh


各行业ui设计规范skill
https://github.com/nextlevelbuilder/ui-ux-pro-max-skill
#安装
/plugin marketplace add nextlevelbuilder/ui-ux-pro-max-skill
/plugin install ui-ux-pro-max@ui-ux-pro-max-skill

# 自动激活
Build a landing page for my SaaS product

# 主动激活
/ui-ux-pro-max Build a landing page for my SaaS product


#How It Works
You ask - Request any UI/UX task (build, design, create, implement, review, fix, improve)
Design System Generated - The AI automatically generates a complete design system using the reasoning engine
Smart recommendations - Based on your product type and requirements, it finds the best matching styles, colors, and typography
Code generation - Implements the UI with proper colors, fonts, spacing, and best practices
Pre-delivery checks - Validates against common UI/UX anti-patterns


posted @ 2026-01-24 20:04 paulwong 阅读(50) | 评论 (0)编辑 收藏

国内安装Claude code

安装命令

#!/bin/bash

set -e

# Parse command line arguments
TARGET="$1"  # Optional target parameter

# Validate target if provided
if [[ -n "$TARGET" ]] && [[ ! "$TARGET" =~ ^(stable|latest|[0-9]+\.[0-9]+\.[0-9]+(-[^[:space:]]+)?)$ ]]; then
    echo "Usage: $0 [stable|latest|VERSION]" >&2
    exit 1
fi

GCS_BUCKET="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases"
DOWNLOAD_DIR="$HOME/.claude/downloads"

# Check for required dependencies
DOWNLOADER=""
if command -v curl >/dev/null 2>&1; then
    DOWNLOADER="curl"
elif command -v wget >/dev/null 2>&1; then
    DOWNLOADER="wget"
else
    echo "Either curl or wget is required but neither is installed" >&2
    exit 1
fi

# Check if jq is available (optional)
HAS_JQ=false
if command -v jq >/dev/null 2>&1; then
    HAS_JQ=true
fi

# Download function that works with both curl and wget
download_file() {
    local url="$1"
    local output="$2"
    
    if [ "$DOWNLOADER" = "curl" ]; then
        if [ -n "$output" ]; then
            curl -fsSL -o "$output" "$url"
        else
            curl -fsSL "$url"
        fi
    elif [ "$DOWNLOADER" = "wget" ]; then
        if [ -n "$output" ]; then
            wget -q -O "$output" "$url"
        else
            wget -q -O - "$url"
        fi
    else
        return 1
    fi
}

# Simple JSON parser for extracting checksum when jq is not available
get_checksum_from_manifest() {
    local json="$1"
    local platform="$2"
    
    # Normalize JSON to single line and extract checksum
    json=$(echo "$json" | tr -d '\n\r\t' | sed 's/ \+/ /g')
    
    # Extract checksum for platform using bash regex
    if [[ $json =~ \"$platform\"[^}]*\"checksum\"[[:space:]]*:[[:space:]]*\"([a-f0-9]{64})\" ]]; then
        echo "${BASH_REMATCH[1]}"
        return 0
    fi
    
    return 1
}

# Detect platform
case "$(uname -s)" in
    Darwin) os="darwin" ;;
    Linux) os="linux" ;;
    *) echo "Windows is not supported" >&2; exit 1 ;;
esac

case "$(uname -m)" in
    x86_64|amd64) arch="x64" ;;
    arm64|aarch64) arch="arm64" ;;
    *) echo "Unsupported architecture: $(uname -m)" >&2; exit 1 ;;
esac

# Check for musl on Linux and adjust platform accordingly
if [ "$os" = "linux" ]; then
    if [ -f /lib/libc.musl-x86_64.so.1 ] || [ -f /lib/libc.musl-aarch64.so.1 ] || ldd /bin/ls 2>&1 | grep -q musl; then
        platform="linux-${arch}-musl"
    else
        platform="linux-${arch}"
    fi
else
    platform="${os}-${arch}"
fi
mkdir -p "$DOWNLOAD_DIR"

# Always download latest version (which has the most up-to-date installer)
version=$(download_file "$GCS_BUCKET/latest")

# Download manifest and extract checksum
manifest_json=$(download_file "$GCS_BUCKET/$version/manifest.json")

# Use jq if available, otherwise fall back to pure bash parsing
if [ "$HAS_JQ" = true ]; then
    checksum=$(echo "$manifest_json" | jq -r ".platforms[\"$platform\"].checksum // empty")
else
    checksum=$(get_checksum_from_manifest "$manifest_json" "$platform")
fi

# Validate checksum format (SHA256 = 64 hex characters)
if [ -z "$checksum" ] || [[ ! "$checksum" =~ ^[a-f0-9]{64}$ ]]; then
    echo "Platform $platform not found in manifest" >&2
    exit 1
fi

# Download and verify
binary_path="$DOWNLOAD_DIR/claude-$version-$platform"
if ! download_file "$GCS_BUCKET/$version/$platform/claude" "$binary_path"; then
    echo "Download failed" >&2
    rm -f "$binary_path"
    exit 1
fi

# Pick the right checksum tool
if [ "$os" = "darwin" ]; then
    actual=$(shasum -a 256 "$binary_path" | cut -d' ' -f1)
else
    actual=$(sha256sum "$binary_path" | cut -d' ' -f1)
fi

if [ "$actual" != "$checksum" ]; then
    echo "Checksum verification failed" >&2
    rm -f "$binary_path"
    exit 1
fi

chmod +x "$binary_path"

# Run claude install to set up launcher and shell integration
echo "Setting up Claude Code"
"$binary_path" install ${TARGET:+"$TARGET"}

# Clean up downloaded file
rm -f "$binary_path"

echo ""
echo "�� Installation complete!"
echo ""


windows, power shell
param(
    [Parameter(Position=0)]
    [ValidatePattern('^(stable|latest|\d+\.\d+\.\d+(-[^\s]+)?)$')]
    [string]$Target = "latest"
)

Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$ProgressPreference = 'SilentlyContinue'

# Check for 32-bit Windows
if (-not [Environment]::Is64BitProcess) {
    Write-Error "Claude Code does not support 32-bit Windows. Please use a 64-bit version of Windows."
    exit 1
}

$GCS_BUCKET = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases"
$DOWNLOAD_DIR = "$env:USERPROFILE\.claude\downloads"

# Always use x64 for Windows (ARM64 Windows can run x64 through emulation)
$platform = "win32-x64"
New-Item -ItemType Directory -Force -Path $DOWNLOAD_DIR | Out-Null

# Always download latest version (which has the most up-to-date installer)
try {
    $version = Invoke-RestMethod -Uri "$GCS_BUCKET/latest" -ErrorAction Stop
}
catch {
    Write-Error "Failed to get latest version: $_"
    exit 1
}

try {
    $manifest = Invoke-RestMethod -Uri "$GCS_BUCKET/$version/manifest.json" -ErrorAction Stop
    $checksum = $manifest.platforms.$platform.checksum

    if (-not $checksum) {
        Write-Error "Platform $platform not found in manifest"
        exit 1
    }
}
catch {
    Write-Error "Failed to get manifest: $_"
    exit 1
}

# Download and verify
$binaryPath = "$DOWNLOAD_DIR\claude-$version-$platform.exe"
try {
    Invoke-WebRequest -Uri "$GCS_BUCKET/$version/$platform/claude.exe" -OutFile $binaryPath -ErrorAction Stop
}
catch {
    Write-Error "Failed to download binary: $_"
    if (Test-Path $binaryPath) {
        Remove-Item -Force $binaryPath
    }
    exit 1
}

# Calculate checksum
$actualChecksum = (Get-FileHash -Path $binaryPath -Algorithm SHA256).Hash.ToLower()

if ($actualChecksum -ne $checksum) {
    Write-Error "Checksum verification failed"
    Remove-Item -Force $binaryPath
    exit 1
}

# Run claude install to set up launcher and shell integration
Write-Output "Setting up Claude Code"
try {
    if ($Target) {
        & $binaryPath install $Target
    }
    else {
        & $binaryPath install
    }
}
finally {
    try {
        # Clean up downloaded file
        # Wait a moment for any file handles to be released
        Start-Sleep -Seconds 1
        Remove-Item -Force $binaryPath
    }
    catch {
        Write-Warning "Could not remove temporary file: $binaryPath"
    }
}

Write-Output ""
Write-Output "$([char]0x2705) Installation complete!"
Write-Output ""


申请api key

https://0011.ai/i/NGRRWNT4

配置Claude code

# 当前终端
CLAUDE_CODE_SKIP_AUTH=true
ANTHROPIC_BASE_URL = "https://aicoding.2233.ai"
ANTHROPIC_API_KEY = "你的 API Key"
ANTHROPIC_AUTH_TOKEN = "你的 API Key"

# 复制 Shell 命令
# 永久设置(~/.zshrc)
export CLAUDE_CODE_SKIP_AUTH=true
export ANTHROPIC_BASE_URL="https://aicoding.2233.ai"
export ANTHROPIC_API_KEY="你的 API Key"
export ANTHROPIC_AUTH_TOKEN="你的 API Key"
source ~/.zshrc

运行

在命令行切换到项目根目录,运行claude

posted @ 2026-01-24 12:22 paulwong 阅读(78) | 评论 (0)编辑 收藏

生成城市图片的提示词

提示词1:
帮我生成图片:一张针对 [上海] 的城市渲染数字艺术海报。
画面核心主体是一个漂浮在白云上方、形状像所选城市的并且占据画面大部分内容的微型岛屿。岛屿的形状与城市在地图上的形状相似,无缝融合城市独特的标志性地标、自然景观及文化元素。加入城市特有的鸟类、电影般的光影、鲜艳色彩、航拍视角和阳光反射效果,建筑不宜太多太密集。
岛屿展现历史与现代的无缝融合。一部分是该城市最具代表性的古代历史建筑;另一部分平滑过渡为城市的地标建筑和天际线景观。
岛屿漂浮浩瀚云海之上。云海采用该城市所在文化圈的传统艺术风格进行表现。
立体城市拼音或英文名的 3D 文字漂浮在微型岛屿的上方,这组文字像一个生态与文化共生的微缩生态装置。
在画面四周和主体周围,叠加一层极简、高雅、具有博物馆展板质感的信息排版层。主要检索相关的城市信息,主要信息使用经典的衬线字体,辅助数据可使用极细的极简无衬线体。在画面的角落,以类似古典地图集或高级杂志扉页的方式排版。用衬线体标注城市的地理坐标、别称或建城年份,以及当前的天气,作为装饰性的背景信息,整体排版留白极多,排版克制、干净、平衡,如同在欣赏一件珍贵的艺术品。
https://mp.weixin.qq.com/s/GqUcajzlA4dWYGJgaWBkCA


提示词2:
一张针对 [城市名称,例如:成都 Chengdu] 的城市渲染数字艺术海报。 画面核心主体是一个漂浮在白云上方、形状像所选城市的并且占据画面大部分内容的微型岛屿。岛屿的形状与城市在地图上的形状相似,无缝融合城市独特的标志性地标、自然景观及文化元素。加入城市特有的鸟类、电影般的光影、鲜艳色彩、航拍视角和阳光反射效果,建筑不宜太多太密集。 岛屿展现历史与现代的无缝融合。一部分是该城市最具代表性的古代历史建筑;另一部分平滑过渡为城市的地标建筑和天际线景观。岛屿漂浮浩瀚云海之上。云海采用该城市所在文化圈的传统艺术风格进行表现。 立体城市拼音或英文名的 3D 文字漂浮在微型岛屿的上方,这组文字像一个生态与文化共生的微缩生态装置。 在画面四周和主体周围,叠加一层极简、高雅、具有博物馆展板质感的信息排版层。主要检索相关的城市信息,主要信息使用经典的衬线字体,辅助数据可使用极细的极简无衬线体。在画面的角落,以类似古典地图集或高级杂志扉页的方式排版。用衬线体标注城市的地理坐标、别称或建城年份,以及当前的天气,排版克制、干净、平衡。 风格要求: Octane Render, C4D, Isometric City, Micro World, Living Ecosystem, 8k Resolution. DreamWorks style, 3D modeling, delicate, soft light projection. --ar 9:16 --v 6.0
https://mp.weixin.qq.com/s/U9zeuB8cJ7ZuEz91jp9ReQ?from=groupmessage&scene=1&subscene=10000&clicktime=1767657795&enterid=1767657795&sessionid=0&ascene=1&fasttmpl_type=4&fasttmpl_fullversion=8071695-zh_CN-zip&fasttmpl_flag=0&realreporttime=1767657795426

posted @ 2026-01-06 08:59 paulwong 阅读(36) | 评论 (0)编辑 收藏

AI应用资源

https://www.zhujunyue.com/hangye/#0



posted @ 2026-01-03 11:21 paulwong 阅读(21) | 评论 (0)编辑 收藏

N8N资源

@bitovi/n8n-nodes-semantic-text-splitter
https://github.com/bitovi/n8n-nodes-semantic-text-splitter?tab=readme-ov-file


posted @ 2025-12-30 09:30 paulwong 阅读(36) | 评论 (0)编辑 收藏

安装docker mcp

架构

AI Client → MCP Gateway → MCP Servers (Docker Containers)

安装docker mcp server

https://hub.docker.com/mcp/explore?categories=database
以docker 的方式安装

安装MCP Gateway

下载docker-mcp https://github.com/docker/mcp-gateway/releases/latest

移到:
Linux    ~/.docker/cli-plugins/docker-mcp
macOS    ~/.docker/cli-plugins/docker-mcp
Windows    %USERPROFILE%\.docker\cli-plugins

启动
# Run the MCP gateway (stdio)
docker mcp gateway run

# Run the MCP gateway (streaming)
docker mcp gateway run --port 8080 --transport streaming

在网关中激活某个mcp server
# List enabled servers
docker mcp server ls

# Enable one or more servers
docker mcp server enable <server-name> [server-name]

# Disable servers
docker mcp server disable <server-name> [server-name]

# Get detailed information about a server
docker mcp server inspect <server-name>

# Reset (disable all servers)
docker mcp server reset


MCP客户端

通过n8n等连接

posted @ 2025-12-14 11:28 paulwong 阅读(85) | 评论 (0)编辑 收藏

解读RAG

向大模型输入问题,让大模型回答。
大模型的做法是,先自己去寻找相关信息,再汇总出答案。这个过程有可能不靠谱,大模型自己寻找出他自己认为是对的信息,可能是错的,所以做出的答案,就是错的。
于是改成,让程序找出相关信息,再给大模型汇总。程序员编程后找出的信息肯定是对的,大模型汇总的结果,以大模型的能力,结果也是对的。

但这种方式有问题,就是会多次调用大模型,大模型通常是部署在远端的,就会产生性能问题。所以在大模型内部,让大模型自己去调用工具。

要大模型自己调用工具,就得靠系统提示词了,当然系统提示词不用自己写,将在n8n中流程导出json,再向deepseek提问,就可以生成提示词了。

调用的工具不止一个,就会产生协同问题,如何将a工具产生的结果作为参数调用b工具,这里的做法就是使用few shot,意思是在提示词中要要提供例子,如调用工具产生结果r1,{"input": r1}以这个参数调用工具b,这样工具b内部通过fromAI("input")就能获取到input参数的值了。

这个过程中大模型实际只做汇总,利用了大模型的长处,避免了大模型的短处。

程序去找信息,如果是从数据库中找出相关文档的方式,就是通常据说的RAG。

但在做RAG的过程中,难免碰到需求,如:用户输入关键词,直播回答某些预先答案。

象这种的实现方式,如果采用将答案弄成文档,再去让程序找到相关文档,再让大模型汇总这种方式也是不可靠。因为找到文档也是靠概率。
因此需使用新的方式,这种方式就是让程序调用工具,得出结果作为相关信息,再让大模型做汇总。这个过程出来的结果就是可靠的了。

为什么大模型会去调用工具呢

如果工具处理的方式不够,需要思考,那就需要加入大模型进去,进行协助,这种工具就是智能体了。整个架构就是所谓的多智能体的方式了。

所以总体的思路,就是让大模型做最擅长的活,汇总,信息提供由外部去做。整个结果就是可控的了。

posted @ 2025-12-13 01:28 paulwong 阅读(47) | 评论 (0)编辑 收藏

仅列出标题
共118页: 上一页 1 2 3 4 5 6 7 8 9 下一页 Last