OCR: document processing with pages, images, tables, dimensions. Audio: transcription with file upload/URL, streaming events (language, text delta, segment, done). Fine-tuning: job CRUD, cancel, start, model archive/unarchive. Batch: job CRUD with cancel. Added doMultipartStream for streaming multipart endpoints.
17 lines
366 B
Go
17 lines
366 B
Go
package mistral
|
|
|
|
import (
|
|
"context"
|
|
|
|
"somegit.dev/vikingowl/mistral-go-sdk/ocr"
|
|
)
|
|
|
|
// OCR performs optical character recognition on a document.
|
|
func (c *Client) OCR(ctx context.Context, req *ocr.Request) (*ocr.Response, error) {
|
|
var resp ocr.Response
|
|
if err := c.doJSON(ctx, "POST", "/v1/ocr", req, &resp); err != nil {
|
|
return nil, err
|
|
}
|
|
return &resp, nil
|
|
}
|