×
¥
查看详情
🔥 会员专享 文生文 工具

代码文档生成器

👁️ 942 次查看
📅 Sep 6, 2025
💡 核心价值: 生成符合标准的完整代码文档,包含函数描述及示例。

🎯 可自定义参数(3个)

编程语言
代码所使用的编程语言,例如:Python、JavaScript
文档风格
文档的格式标准,例如:Google Style、Markdown
代码内容
需要生成文档的代码内容,例如:def add(a, b): return a + b

🎨 效果示例

# Python函数文档

## 函数名称: `add`

**描述**  
`add`函数是一个简单的加法函数,用于将两个数相加并返回结果。

---

## 参数

### 1. `a`  
- **类型**: 任意数字类型(如`int`, `float`)  
- **描述**: 第一个加数,表示要进行加法操作的其中一个数值。

### 2. `b`  
- **类型**: 任意数字类型(如`int`, `float`)  
- **描述**: 第二个加数,表示要进行加法操作的另一个数值。

---

## 返回值

- **类型**: 与输入参数相同,通常是`int`或`float`  
- **描述**: 返回两个参数 `a` 和 `b` 相加的结果。

---

## 示例代码

以下是如何使用函数`add`的示例代码:

```python
# 示例 1: 常规整数相加
result = add(3, 5)
print(result)  # 输出: 8

# 示例 2: 浮点数相加
result = add(2.5, 4.3)
print(result)  # 输出: 6.8

# 示例 3: 整数和浮点数相加
result = add(7, 3.5)
print(result)  # 输出: 10.5

使用注意事项

  • 该函数假设输入的参数是可以进行加法操作的数值类型,如果输入其他类型(如字符串或列表),可能会引发错误。
  • 使用浮点数进行运算时可能会有精度误差,这是Python浮点数本身的特性。
    例如:
result = add(0.1, 0.2)
print(result)  # 输出: 0.30000000000000004

以下是根据Google Style生成的完整文档,符合函数描述、参数详情、返回值、以及示例代码的要求:

/**
 * Multiplies two numbers and returns the result.
 *
 * This function takes in two numeric arguments, `a` and `b`, 
 * and returns the product of these two values. It is designed 
 * to perform simple multiplication operations.
 *
 * @param {number} a The first number to multiply.
 * @param {number} b The second number to multiply.
 * @return {number} The product of the two numbers.
 *
 * @example
 * // Simple multiplication of two integers
 * const result1 = multiply(3, 4);
 * console.log(result1); // Output: 12
 *
 * // Multiplication involving a decimal
 * const result2 = multiply(2.5, 4);
 * console.log(result2); // Output: 10
 *
 * // Multiplication with negative numbers
 * const result3 = multiply(-2, 3);
 * console.log(result3); // Output: -6
 */
function multiply(a, b) {
  return a * b;
}

此文档注释块详尽地描述了函数的用途和行为,包括参数说明(@param)、返回值(@return),并提供了若干常见使用情景的示例代码(@example),完全符合Google Style文档注释的标准。

Java Method Documentation

Function: subtract

Description

The subtract method takes two integers as input and returns their difference. It performs a simple arithmetic operation by subtracting the second parameter from the first.


Parameters

Name Type Description
a int The minuend. The number from which another is subtracted.
b int The subtrahend. The number to be subtracted.

Return Value

  • Type: int
  • Description: Returns the difference between the two parameters a and b.

Example Usage

public class MathOperations {
    public static void main(String[] args) {
        MathOperations operations = new MathOperations();

        // Example usage of the subtract method
        int result = operations.subtract(10, 4);

        // Print the result
        System.out.println("The result of subtraction: " + result); // Output: 6
    }

    /**
     * Subtract two integers and return the result.
     * @param a The minuend
     * @param b The subtrahend
     * @return The result of a - b
     */
    public int subtract(int a, int b) {
        return a - b;
    }
}

Explanation of Example

In the example above:

  • Method subtract is called with arguments 10 and 4.
  • It calculates 10 - 4, which equals 6.
  • The result is then output to the console: The result of subtraction: 6.

This documentation adheres to Markdown standards and provides all the necessary details for understanding and using the subtract method effectively.

示例详情

📖 如何使用

模式 1:即插即用(手动档)
直接复制参数化模版。手动修改 {{变量}} 即可快速发起对话,适合对结果有精准预期的单次任务。
加载中...
💬 模式 2:沉浸式引导(交互档)
一键转化为交互式脚本。AI 将化身专业面试官或顾问,主动询问并引导您提供关键信息,最终合成高度定制化的专业结果。
转为交互式
🚀 模式 3:原生指令自动化(智能档)
无需切换,输入 / 唤醒 8000+ 专家级提示词。 插件将全站提示词库深度集成于 Chat 输入框。基于当前对话语境,系统智能推荐最契合的 Prompt 并自动完成参数化,让海量资源触手可及,从此彻底告别“手动搬运”。
安装插件
🔌 发布为 API 接口
将 Prompt 接入自动化工作流,核心利用平台批量评价反馈引擎,实现"采集-评价-自动优化"的闭环。通过 RESTful 接口动态注入变量,让程序在批量任务中自动迭代出更高质量的提示词方案,实现 Prompt 的自我进化。
发布 API
🤖 发布为 Agent 应用
以此提示词为核心生成独立 Agent 应用,内嵌相关工具(图片生成、参数优化等),提供完整解决方案。
创建 Agent

🕒 版本历史

当前版本
v2.1 2024-01-15
优化输出结构,增强情节连贯性
  • ✨ 新增章节节奏控制参数
  • 🔧 优化人物关系描述逻辑
  • 📝 改进主题深化引导语
  • 🎯 增强情节转折点设计
v2.0 2023-12-20
重构提示词架构,提升生成质量
  • 🚀 全新的提示词结构设计
  • 📊 增加输出格式化选项
  • 💡 优化角色塑造引导
v1.5 2023-11-10
修复已知问题,提升稳定性
  • 🐛 修复长文本处理bug
  • ⚡ 提升响应速度
v1.0 2023-10-01
首次发布
  • 🎉 初始版本上线
COMING SOON
版本历史追踪,即将启航
记录每一次提示词的进化与升级,敬请期待。

💬 用户评价

4.8
⭐⭐⭐⭐⭐
基于 28 条评价
5星
85%
4星
12%
3星
3%
👤
电商运营 - 张先生
⭐⭐⭐⭐⭐ 2025-01-15
双十一用这个提示词生成了20多张海报,效果非常好!点击率提升了35%,节省了大量设计时间。参数调整很灵活,能快速适配不同节日。
效果好 节省时间
👤
品牌设计师 - 李女士
⭐⭐⭐⭐⭐ 2025-01-10
作为设计师,这个提示词帮我快速生成创意方向,大大提升了工作效率。生成的海报氛围感很强,稍作调整就能直接使用。
创意好 专业
COMING SOON
用户评价与反馈系统,即将上线
倾听真实反馈,在这里留下您的使用心得,敬请期待。
加载中...