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.4.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.4.tar.gz.

File metadata

File hashes

Hashes for llm_structured_output_detect_repairs-0.1.4.tar.gz
Algorithm Hash digest
SHA256 94d57d1f35d24f3a97fac3e4419a3b9d10cda48bdd2fd6fd0ab380e16b8b58db
MD5 37556672f7595f745d77edaf3da636b2
BLAKE2b-256 869b122e77370c2c88582eebbfe5b28402d80fb5345e0914dfc9dbee504e638a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llm_structured_output_Detect_repairs-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fe33379c6c700ab909fe933c35df3a9e786569cc928f65e7577e49c95ab7854d
MD5 ad5b262412a1d77cf39bb1c14c268dd6
BLAKE2b-256 cf85b0b994dd63cdffa059bec34b846e81fba6ae163b466bd61be05cd3f9ef19

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