AI-powered Hello World generator - A fun project that uses AI to output Hello World
Project description
vibe-helloworld
一个有趣的AI驱动的Hello World生成器项目
中文 | English
中文 | 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" # 可选,默认使用官方地址
# 结构化输出模式(默认)- 返回 "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 基础地址(可选,默认为官方地址)
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vibe_helloworld-0.1.0.tar.gz
(62.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vibe_helloworld-0.1.0.tar.gz.
File metadata
- Download URL: vibe_helloworld-0.1.0.tar.gz
- Upload date:
- Size: 62.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe69f994f85a5c08c94237899f50cb80a514c3e59f1f777932d2dd6b1067d420
|
|
| MD5 |
a051e99266a97f9cb2a897715e6990c0
|
|
| BLAKE2b-256 |
37c49e4636ddb24a55044c070d25bd1d5716ff2efee5b247d1b4fc51ff1f9877
|
File details
Details for the file vibe_helloworld-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vibe_helloworld-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61b50a5ef340991e51c29039da1ec5c2c107a5ef4cc702c3de69ee8df9d071ab
|
|
| MD5 |
8ce0bc7dd7b718b61026c637562e50b4
|
|
| BLAKE2b-256 |
77c218e4c86b2719cbf9d26900cadab1f4d5f7f10ec3ae12b1962a2ed0418441
|