# hbotsdk **Repository Path**: liul3/hbotsdk ## Basic Information - **Project Name**: hbotsdk - **Description**: HBotsdk 是一个集成了多种 OCR(光学字符识别)功能的 SDK,支持与 Hbot 服务进行交互,实现文件上传、聊天、会话管理等功能。本项目包含前后端代码,前端基于 Vue.js 实现,后端基于 Spring Boot 实现。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2025-11-23 - **Last Updated**: 2026-01-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # hbotsdk HBotsdk is an SDK integrating multiple OCR (Optical Character Recognition) functionalities, enabling interaction with Hbot services to perform file uploads, chatting, session management, and more. This project includes both frontend and backend code, with the frontend implemented using Vue.js and the backend using Spring Boot. ## Features - **OCR Support**: Supports multiple OCR modes, including general OCR, layout-free extraction, chart parsing, image description, and text localization. - **File Handling**: Supports file upload, download, and deletion operations. - **Chat Functionality**: Supports streaming chat, synchronous chat, and request completion. - **Session Management**: Supports retrieving session lists, message lists, and creating new sessions. ## Technology Stack - **Frontend**: Vue.js, TypeScript, Vite - **Backend**: Spring Boot, Java 17, OkHttp - **OCR Support**: DeepSeek OCR, Paddle OCR ## Environment Setup ### Frontend - Node.js 16+ - npm or yarn ### Backend - Java 17+ - Maven ## Install Dependencies ### Frontend ```bash cd hbotsdk-ui npm install ``` ### Backend Ensure Maven is installed, then run: ```bash mvn clean install ``` ## Development Mode ### Frontend ```bash npm run dev ``` ### Backend Import the project into an IDE (e.g., IntelliJ IDEA) and run `BackendApplication.java`. ## Production Build ### Frontend ```bash npm run build ``` ### Backend ```bash mvn clean package ``` ## API Base Endpoints - **DeepSeek OCR**: `/ds` - **Paddle OCR**: `/pd` - **Bailing API**: `/bailing` ## Usage Guide ### OCR Functions - **General OCR**: `POST /ds/ocr` — Upload an image for general OCR recognition. - **Layout-Free Extraction**: `POST /ds/ocr-free` — Upload an image for layout-free OCR recognition. - **Chart Parsing**: `POST /ds/ocr-figure` — Upload an image to parse chart content. - **Image Description**: `POST /ds/ocr-desc` — Upload an image to obtain a description. - **Text Localization**: `POST /ds/ocr-locate` — Upload an image and locate specific text. ### File Handling - **Upload File**: `POST /bailing/upload-image-to-afts` — Upload an image to the AFTS service. ### Chat Functionality - **Streaming Chat**: `POST /bailing/stream-chat-with-file` — Supports streaming chat with a single uploaded file. ### Session Management - **Get Session List**: `GET /bailing/conversations` — Retrieve the list of sessions. ## Project Structure - **Frontend**: `hbotsdk-ui/` - **Backend**: `src/main/java/xyz/housailei/backend/` - **Configuration File**: `application.yml` - **Dependency Management**: `pom.xml` ## Contribution Guidelines Contributions to code and documentation are welcome. Please follow these steps: 1. Fork the project 2. Create a new branch 3. Commit your changes 4. Open a Pull Request ## License This project is licensed under the MIT License. See the LICENSE file for details.