Library Search
结果页

02-function-calling-rag

在 元器件 / 技术栈 / 知识库 中找到 12 个匹配结果。

返回文档库
技术栈

技术栈

4 个
查看全部
知识库

知识库

8 个
02-function-calling-rag # OpenAI Function Calling + RAG 构建 AI Agent ## 目标 - 掌握 Function Calling(工具调用)机制 - 构建基于 Embeddings 的 RAG 知识库问答 - 实现完整的 AI Agent 循环 ## 完整代码 ### 1. Function Calling —— 让 GPT 调用你的函数 ```python import… 3% CRUD 与动态查询 return cb.and(predicates.toArray(new Predicate[0])); }; } } ``` ### 4. 使用示例 ```java package com.example; import com.example.entity.Product; import com.example.entity.Product.Status; imp… 2% INMP441 I2S 麦克风 — 代码例程 (ESP32 + STM32) void dual_i2s_init() { i2s_config_t i2s_config = { .mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_RX), .sample_rate = SAMPLE_RATE, .bits_per_sample = I2S_BITS_PER_SAMPLE_3… 2% ESP32) ledc_channel_config_t ch_conf = { .gpio_num = XCLK_GPIO_NUM, .speed_mode = LEDC_HIGH_SPEED_MODE, .channel = LEDC_CHANNEL_0, .timer_sel = LEDC_TIMER_0, .duty = 2… 1% Hello World - 全栈代办+API async function addTodo() { const text = newTodo.value.trim() if (!text) return await $fetch('/api/todos', { method: 'POST', body: { text } }) newTodo.value = '' refresh() } async function r… 1% Arduino Nano ESP32 — 代码例程 void setup() { Serial.begin(115200); delay(1000); // 内存统计 Serial.println("=== Memory Info ==="); Serial.printf("Total SRAM: %d KB\n", ESP.getHeapSize() / 1024); Serial.… 1% Arduino) int dx_lr22_atCmd(const char *cmd, char *resp, uint16_t respMax, uint32_t timeout_ms) { // 切换到 AT 模式 dx_lr22_setMode(MODE_AT); delay(10); // 排空缓冲区 while (LORA_SERIAL.available… 1% MN316 NB-IoT驱动代码 — STM32 UART+DMA+IDLE · MQTT物模型上报 /** * @brief 在stm32f1xx_it.c的USART2_IRQHandler中调用此函数 * 实现UART IDLE中断 + DMA接收 * * stm32f1xx_it.c 示例: * * void USART2_IRQHandler(void) * { * if (__HAL_UART_GET_FLAG(&huart2, UAR… 1%