Skip to main content

一个简单的HTTP客户端库,用于与结构化输出API交互

Project description

llm_structured_output_Detect_repairs

A simple HTTP client library for interacting with a structured output API.

安装

pip install llm_structured_output_Detect_repairs

以下是一个完整的示例代码,展示了如何使用 llm_structured_output_Detect_repairs 发送请求并解析响应:



import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from llm_structured_output_Detect_repairs.llm_output_parser import LLMOutputParser
import json

# 创建 LLMOutputParser 实例
client = LLMOutputParser()
model = 'openai'
output_format = [
    {"name": "name", "description": "name of people", "type": "str"},
    {"name": "age", "description": "age of person", "type": "int"},
    {"name": "stories", "description": "all stories in the life, list of story details", "type": "list"}
]
content = "李白简介"
response_data = client.parse(model, content, output_format)

if response_data:
    print("服务端返回数据:")
    print(json.dumps(response_data, indent=4, ensure_ascii=False))
else:
    print("请求失败或解析错误")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_structured_output_detect_repairs-0.1.3.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llm_structured_output_detect_repairs-0.1.3.tar.gz.

File metadata

File hashes

Hashes for llm_structured_output_detect_repairs-0.1.3.tar.gz
Algorithm Hash digest
SHA256 731b4299f6b347568eee5e8715e2e3b6ddaa76d3afa8dafee078f7184ba4f58c
MD5 9b6d97e288eb26731ea448bee69ab800
BLAKE2b-256 8a5cf2c708c45c3c6407de4cbddb31a70e03b41c8d680ae07502279035903840

See more details on using hashes here.

File details

Details for the file llm_structured_output_Detect_repairs-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_structured_output_Detect_repairs-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 22c0d9c9bf12343e91e80988c80684ebe5a5477399f62d9a0f73ab41589d7fda
MD5 99ab4c1ce1f17aa55c7195f66422d968
BLAKE2b-256 898c7e68c23b86049e9a6892ab6ca4b420fcf68a96111a1ade152edf6180ae17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page