> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat-Vervollständigungen

> Rufe /chat/completions mit dem Go-Wrapper auf.

Verwende die Wrapper-Methodee:

* `client.GenerateText(ctx, req)`

```go theme={null}
import (
  "context"
  "fmt"
  phaseo "github.com/phaseoteam/Phaseo/packages/sdk/sdk-go/v3"
)

client := phaseo.New(apiKey, "https://api.phaseo.app/v1")
resp, err := client.GenerateText(context.Background(), phaseo.ChatCompletionsRequest{
  Model: "openai/gpt-5-nano",
  Messages: []map[string]interface{}{
    {
      "role": "user",
      "content": "Write a one-line haiku.",
    },
  },
})
if err != nil {
  panic(err)
}

fmt.Println(resp)
```

Der Wrapper bietet Streaming noch nicht als eigene Hilfsfunktion an.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.