Files
mistral-go-sdk/ocr_api.go
vikingowl 776b693f2d chore: move module path to github.com/VikingOwl91/mistral-go-sdk
Public discoverability on pkg.go.dev. Also fixes stream tool call
test fixture to match real Mistral API responses (finish_reason, usage).
2026-04-03 12:01:11 +02:00

17 lines
367 B
Go

package mistral
import (
"context"
"github.com/VikingOwl91/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
}