{"id":228,"date":"2026-05-30T15:05:09","date_gmt":"2026-05-30T07:05:09","guid":{"rendered":"https:\/\/www.houzhibin.top\/?p=228"},"modified":"2026-05-30T15:50:01","modified_gmt":"2026-05-30T07:50:01","slug":"%e6%96%b0%e8%83%bd%e6%ba%90%e9%80%89%e8%bd%a6agent","status":"publish","type":"post","link":"https:\/\/www.houzhibin.top\/?p=228","title":{"rendered":"\u65b0\u80fd\u6e90\u9009\u8f66Agent"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Dify\u642d\u5efa\u6d41\u7a0b\uff1a<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.houzhibin.top\/wp-content\/uploads\/2026\/05\/image-1024x557.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"557\" data-original=\"https:\/\/www.houzhibin.top\/wp-content\/uploads\/2026\/05\/image-1024x557.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-229\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u9996\u5148,\u53bbsupabase\u5efa\u8868\uff0c\u6570\u636e\u5e93\u5206\u4e3a\u4e24\u4e2a\u8868 ev_model  \u548c  favourites ,<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary> ev_model<\/summary>\n<p>&#8212; \u53ef\u9009\uff1a\u542f\u7528 pgcrypto \u4ee5\u4f7f\u7528 gen_random_uuid()<br>CREATE EXTENSION IF NOT EXISTS pgcrypto;<\/p>\n\n\n\n<p>CREATE TABLE IF NOT EXISTS public.ev_models (<br>id uuid PRIMARY KEY DEFAULT gen_random_uuid(),<br>brand text NOT NULL, &#8212; \u54c1\u724c<br>model text NOT NULL, &#8212; \u578b\u53f7<br>variant text, &#8212; \u7248\u672c\/\u914d\u7f6e<br>body_type text NOT NULL, &#8212; \u8f66\u8eab\u7c7b\u578b\uff08\u5982 \u8f7f\u8f66\/SUV\/MPV\/\u76ae\u5361\uff09<br>release_date date, &#8212; \u53d1\u5e03\u65e5\u671f<\/p>\n\n\n\n<p>price_min numeric(10,2), &#8212; \u6700\u4f4e\u4ef7\u683c<br>price_max numeric(10,2), &#8212; \u6700\u2fbc\u4ef7\u683c<br>market_position text, &#8212; \u5e02\u573a\u5b9a\u4f4d\uff08\u7d27\u51d1\u578bSUV\/\u4e2d\u5927\u578b\u8f7f\u8f66 \u7b49\uff09<\/p>\n\n\n\n<p>power_type text NOT NULL, &#8212; \u52a8\u529b\u7c7b\u578b\uff08\u7eaf\u7535\/\u63d2\u6df7\/\u589e\u7a0b\/\u71c3\u6cb9\uff09<br>range_km integer, &#8212; \u7eed\u822a\u91cc\u7a0b\uff08km\uff09<br>battery_capacity_kwh numeric(6,2), &#8212; \u7535\u6c60\u5bb9\u91cf\uff08kWh\uff09<\/p>\n\n\n\n<p>autonomous_level text, &#8212; \u667a\u9a7e\u7b49\u7ea7\uff08L0~L4 \u6587\u672c\u5b58\u50a8\uff09<br>driver_assist_features jsonb, &#8212; \u9a7e\u9a76\u8f85\u52a9\u529f\u80fd JSON<\/p>\n\n\n\n<p>source text, &#8212; \u6570\u636e\u6765\u6e90<br>created_at timestamptz NOT NULL DEFAULT now(),<br>updated_at timestamptz NOT NULL DEFAULT now(),<\/p>\n\n\n\n<p>&#8212; \u7ea6\u675f<br>CONSTRAINT uq_brand_model_variant UNIQUE (brand, model, variant),<br>CONSTRAINT ck_price_nonneg CHECK (<br>(price_min IS NULL OR price_min &gt;= 0) AND<br>(price_max IS NULL OR price_max &gt;= 0)<br>),<br>CONSTRAINT ck_price_range CHECK (<br>price_min IS NULL OR price_max IS NULL OR price_max &gt;= price_min<br>),<br>CONSTRAINT ck_range_nonneg CHECK (range_km IS NULL OR range_km &gt;= 0),<br>CONSTRAINT ck_battery_nonneg CHECK (battery_capacity_kwh IS NULL OR battery_capacity_kwh &gt;= 0)<br>);<\/p>\n\n\n\n<p>&#8212; \u5e38\u7528\u67e5\u8be2\u7d22\u5f15\uff08\u6309\u9700\u4fdd\u7559\uff09<br>CREATE INDEX IF NOT EXISTS idx_ev_models_brand ON public.ev_models (brand);<br>CREATE INDEX IF NOT EXISTS idx_ev_models_body_type ON public.ev_models (body_type);<br>CREATE INDEX IF NOT EXISTS idx_ev_models_power_type ON public.ev_models (power_type);<\/p>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>favourites <\/summary>\n<p>create table public.favorites (<br>user_id uuid not null,<br>brand text not null,<br>model text not null,<br>reason text null,<br>id uuid not null,<br>constraint favorites_pkey primary key (brand, model, id)<br>) TABLESPACE pg_default;<\/p>\n\n\n\n<p><\/p>\n<\/details>\n\n\n\n<p>\u4e00\u4e2a\u5b58\u50a8\u65b0\u80fd\u6e90\u6c7d\u8f66\u7684\u54c1\u724c\u3001\u578b\u53f7\u3001\u4ef7\u683c\u3001\u8f66\u8f86\u7c7b\u578b\uff08\u4f8b\u5982\u8f7f\u8f66\u6216 SUV\uff09\u3001\u7eed\u822a\u91cc\u7a0b\u3001\u667a\u80fd\u9a7e\u9a76\u80fd\u529b\u3001\u53d1\u5e03\u65e5\u671f\u3001\u4eae\u70b9\uff08Highlights\uff09\u3001\u4ee5\u53ca\u5b89\u5168\u6027\u914d\u7f6e<br>\u53e6\u4e00\u4e2a\u8868\u7528\u4e8e\u5b58\u50a8\u5f53\u7528\u6237\u8f93\u5165\u559c\u6b22\u65f6\uff0c\u628a\u8fd9\u4e2a\u8f66\u578b\u52a0\u5165\u6b64\u8868<\/p>\n\n\n\n<p>\u589e\u52a0\u6570\u636e\u5e93\uff1a<\/p>\n\n\n\n<p>\u5728\u5de5\u5177\u4e2d\u641c\u7d22supabase,<\/p>\n\n\n\n<p>\u628a\u9875\u9762\u5c55\u793a\u8f66\u578b\u56fe\u7247\uff0c\u4ecb\u7ecd\u5b58\u5165supabase\u4e2d\uff0c\u4f9bagent\u53bb\u68c0\u7d22\u3002<\/p>\n\n\n\n<p>google \u5de5\u5177\uff0c<\/p>\n\n\n\n<p>\u5f53\u641c\u7d22\u4e0d\u5230\u6700\u8fd1\u8f66\u578b\u65f6\uff0c\u907f\u514dagent\u53bb\u80e1\u8bf4\u516b\u9053\uff0c\u505a\u7684\u515c\u5e95\u5904\u7406\u3002<\/p>\n\n\n\n<p>\u98de\u4e66\u5de5\u5177\uff0c<\/p>\n\n\n\n<p>\u7528\u6765\u8fdb\u884c\u8054\u7cfb\u9500\u552e\uff0c\u8bd5\u9a7e\uff0c\u9884\u7ea6\uff0c\u4f7fagent\u4e0d\u518d\u662f\u95ee\u7b54\u800c\u662f\u53bb\u771f\u5b9e\u7684\u8fde\u63a5\u5230\u771f\u5b9e\u7684\u4e1a\u52a1\u3002<\/p>\n\n\n\n<p>GitHub\uff1a<a href=\"https:\/\/github.com\/qiuxuezhe345\/car_choose\">https:\/\/github.com\/qiuxuezhe345\/car_choose<\/a><\/p>\n\n\n\n<p>\u90e8\u7f72\u4e0a\u7ebf\u7f51\u5740\uff1a<a href=\"https:\/\/carchoose.houzhibin.top\/\">https:\/\/carchoose.houzhibin.top\/<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dify\u642d\u5efa\u6d41\u7a0b\uff1a \u9996\u5148,\u53bbsupabase\u5efa\u8868\uff0c\u6570\u636e\u5e93\u5206\u4e3a\u4e24\u4e2a\u8868 ev_model \u548c favourites [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":234,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-228","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=\/wp\/v2\/posts\/228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=228"}],"version-history":[{"count":1,"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":232,"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=\/wp\/v2\/posts\/228\/revisions\/232"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=\/wp\/v2\/media\/234"}],"wp:attachment":[{"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.houzhibin.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}