Bỏ qua để đến nội dung

Tạo các vectơ nhúng

Xem Markdownllms.txt

API origin: https://api.openaihub.net. Chọn đúng nhóm API và model. Thông số dưới đây là bản tham chiếu kỹ thuật; chưa phải kết quả kiểm thử từng endpoint bằng tài khoản của bạn.

openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/embeddings:
post:
summary: Tạo các vectơ nhúng
deprecated: false
description: >-
Tạo các phần nhúng vectơ văn bản. Chọn dịch vụ nguồn thông qua `model`
(chẳng hạn như `text-embedding-3-small` của OpenAI hoặc mô hình phần
nhúng của Gemini).
Tài liệu chính thức của OpenAI:
https://platform.openai.com/docs/api-reference/embeddings
operationId: v1_embeddings
tags:
- OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Trò chuyện/ChatGpt/Nhúng ChatGPT
- Nhúng
parameters: []
requestBody:
content:
application/json:
schema:
type: object
required:
- model
- input
properties:
dimensions:
type: integer
description: Số chiều của vectơ
input:
type: string
description: Vui lòng cung cấp nội dung tài liệu cần dịch.
model:
type: string
description: Tên mô hình / mã định danh mô hình
refName: V1EmbeddingsRequest
x-apifox-orders:
- dimensions
- input
- model
x-apidog-orders:
- dimensions
- input
- model
examples:
minimal:
value:
input: Món ăn rất ngon và nhân viên phục vụ rất thân thiện.
model: text-embedding-3-small
summary: minimal
description: Mức tối thiểu khả dụng
responses:
'200':
description: Được
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
x-apidog-orders: []
description: >-
Phần dữ liệu (thường là Base64 hoặc một đối tượng có cấu
trúc)
model:
type: string
description: Tên mô hình / mã định danh mô hình
object:
type: string
description: 'Định danh kiểu đối tượng, ví dụ: chat.completion'
usage:
type: object
description: Thống kê mức sử dụng token
x-apidog-orders: []
refName: V1EmbeddingsResponse
x-apifox-orders:
- data
- model
- object
- usage
x-apidog-orders:
- data
- model
- object
- usage
examples:
example:
summary: example
value:
data:
- {}
model: chuỗi
object: chuỗi
usage: {}
headers: {}
x-apidog-name: Được
'400':
description: Yêu cầu không hợp lệ hoặc xác thực thất bại
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: object
required:
- message
- type
properties:
message:
type: string
description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu)
type:
type: string
description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error
examples:
- new_api_error
x-apifox-orders:
- message
- type
x-apidog-orders:
- message
- type
refName: NewApiError
x-apifox-orders:
- error
x-apidog-orders:
- error
examples:
example:
summary: example
value:
error:
message: >-
Yêu cầu không hợp lệ (mã yêu cầu:
20260805120000123456789AbCdEfGh)
type: new_api_error
headers: {}
x-apidog-name: Yêu cầu không hợp lệ hoặc xác thực thất bại
'401':
description: Khóa API bị thiếu hoặc không hợp lệ
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: object
required:
- message
- type
properties:
message:
type: string
description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu)
type:
type: string
description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error
examples:
- new_api_error
x-apifox-orders:
- message
- type
x-apidog-orders:
- message
- type
refName: NewApiError
x-apifox-orders:
- error
x-apidog-orders:
- error
examples:
example:
summary: example
value:
error:
message: >-
Mã thông báo không hợp lệ (request id:
20260805120000123456789AbCdEfGh)
type: new_api_error
headers: {}
x-apidog-name: Khóa API bị thiếu hoặc không hợp lệ
security: []
x-apidog-folder: OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Trò chuyện/ChatGpt/Nhúng ChatGPT
x-apidog-status: released
x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45208826-run
components:
schemas: {}
securitySchemes: {}
servers:
- url: https://api.openaihub.net
description: Prod Env
security: []