Skip to main content

vibe-helloworld

一个有趣的AI驱动的Hello World生成器项目
中文 | English

系统要求

  • Python 3.10+

安装

pip install vibe-helloworld

使用方法

from vibe_helloworld import VibeHelloWorld

# 设置环境变量
# export OPENAI_API_KEY="your_api_key_here"
# export OPENAI_BASE_URL="https://api.openai.com/v1/chat/completions"  # 可选,默认使用官方地址
# export OPENAI_MODEL="gpt-4o-mini"  # 可选,默认使用 gpt-4o-mini

# 结构化输出模式(默认)- 返回 "hello world"
result = VibeHelloWorld("This is my first AI project")
print(result)  # "hello world"

# 正常聊天对话模式 - 返回 AI 的正常回复
response = VibeHelloWorld("How are you today?", chat_with_nlp=False)
print(response)  # AI的正常聊天回复

# 更多示例
structured = VibeHelloWorld("测试消息", chat_with_nlp=True)
print(structured)  # "hello world"

chat = VibeHelloWorld("你好,请介绍一下自己", chat_with_nlp=False)
print(chat)  # AI的自我介绍

参数说明

  • message: str: 输入消息
  • chat_with_nlp: bool = True:
    • True: 使用结构化输出,强制返回 "hello world"
    • False: 正常聊天对话模式,返回 AI 的自然回复

环境变量

  • OPENAI_API_KEY: OpenAI API 密钥(必需)
  • OPENAI_BASE_URL: API 基础地址(可选,默认为官方地址)
  • OPENAI_MODEL: 使用的模型(可选,默认为 gpt-4o-mini)

License

MIT

Metadata

Release files for vibe-helloworld 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vibe-helloworld 0.1.1
File Size Uploaded
vibe_helloworld-0.1.1.tar.gz 62.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vibe-helloworld 0.1.1
File Interpreter ABI Platform
vibe_helloworld-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 67.7 kB

Release files / vibe_helloworld-0.1.1.tar.gz

Download URL vibe_helloworld-0.1.1.tar.gz
Size 62.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b29748971e8b834cccaf04d2d1ec4b7f011378b981ab4b93e8f6d2f64750a808
BLAKE2b-256 checksum
How to use checksums
1ae8a30721857dc743d49860dad2da7684612573aebaf7d01a0973002586eff4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.11

Release files / vibe_helloworld-0.1.1-py3-none-any.whl

Download URL vibe_helloworld-0.1.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea7e32a31568033df92741ab6a730abe1a279519f237c524f43cc99acef6ff34
BLAKE2b-256 checksum
How to use checksums
0025bca913596772df2141e4bbdf01a33e97cf595c099b143c60cf415be714f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.11

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page