private_gpt_dio 1.0.2
private_gpt_dio: ^1.0.2 copied to clipboard
OpenAPI API client for private gpt
openapi (EXPERIMENTAL) #
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This Dart package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.0
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen
Requirements #
- Dart 2.15.0+ or Flutter 2.8.0+
- Dio 5.0.0+ (https://pub.flutter-io.cn/packages/dio)
Installation & Usage #
pub.flutter-io.cn #
To use the package from pub.flutter-io.cn, please include the following in pubspec.yaml
dependencies:
openapi: 1.0.0
Github #
If this Dart package is published to Github, please include the following in pubspec.yaml
dependencies:
openapi:
git:
url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
#ref: main
Local development #
To use the package from your local drive, please include the following in pubspec.yaml
dependencies:
openapi:
path: /path/to/openapi
Getting Started #
Please follow the installation procedure and then run the following:
import 'package:private_gpt_dio/private_gpt_dio.dart';
final api = Openapi().getContextChunksApi();
final ChunksBody chunksBody = ; // ChunksBody |
try {
final response = await api.chunksRetrievalV1ChunksPost(chunksBody);
print(response);
} catch on DioException (e) {
print("Exception when calling ContextChunksApi->chunksRetrievalV1ChunksPost: $e\n");
}
Documentation for API Endpoints #
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ContextChunksApi | chunksRetrievalV1ChunksPost | POST /v1/chunks | Chunks Retrieval |
| ContextualCompletionsApi | chatCompletionV1ChatCompletionsPost | POST /v1/chat/completions | Chat Completion |
| ContextualCompletionsApi | promptCompletionV1CompletionsPost | POST /v1/completions | Completion |
| EmbeddingsApi | embeddingsGenerationV1EmbeddingsPost | POST /v1/embeddings | Embeddings Generation |
| HealthApi | healthHealthGet | GET /health | Health |
| IngestionApi | deleteIngestedV1IngestDocIdDelete | DELETE /v1/ingest/{doc_id} | Delete Ingested |
| IngestionApi | ingestFileV1IngestFilePost | POST /v1/ingest/file | Ingest File |
| IngestionApi | ingestTextV1IngestTextPost | POST /v1/ingest/text | Ingest Text |
| IngestionApi | ingestV1IngestPost | POST /v1/ingest | Ingest |
| IngestionApi | listIngestedV1IngestListGet | GET /v1/ingest/list | List Ingested |
Documentation For Models #
- ChatBody
- ChatBodyContextFilter
- Chunk
- ChunksBody
- ChunksResponse
- CompletionsBody
- Content
- ContextFilter
- DocMetadata
- DocsIds
- Embedding
- EmbeddingsBody
- EmbeddingsResponse
- FinishReason
- HTTPValidationError
- HealthResponse
- IngestResponse
- IngestTextBody
- IngestedDoc
- Input
- NextTexts
- OpenAIChoice
- OpenAIChoiceDelta
- OpenAIChoiceMessage
- OpenAICompletion
- OpenAIDelta
- OpenAIMessage
- PreviousTexts
- Sources
- SystemPrompt
- ValidationError
- ValidationErrorLocInner
Documentation For Authorization #
Endpoints do not require authorization.