@@ -9,19 +9,14 @@ This repository contains a generic HTTP client which can be adapted to provide:
9
9
* Debugging capabilities to see the request and response data
10
10
* Streaming text and JSON events
11
11
12
- API Documentation: https://pkg.go.dev/github.com/mutablelogic/go-client
12
+ API Documentation: < https://pkg.go.dev/github.com/mutablelogic/go-client >
13
13
14
14
There are also some example clients which use this library:
15
15
16
- * [ Anthropic API Client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/anthropic ) for Claude LLM
17
16
* [ Bitwarden API Client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/bitwarden )
18
- * [ Elevenlabs API Client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/elevenlabs ) for Text-to-Speech
19
17
* [ Home Assistant API Client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/homeassistant )
20
18
* [ IPify Client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/ipify )
21
- * [ Mistral API Client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/mistral ) for Mistral LLM
22
19
* [ NewsAPI client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/newsapi )
23
- * [ Ollama API client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/ollama ) for locally-hosted LLM's
24
- * [ OpenAI API client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/openai ) for OpenAI LLM's
25
20
* [ WeatherAPI client] ( https://github.com/mutablelogic/go-client/tree/main/pkg/weatherapi )
26
21
27
22
Aiming to have compatibility with go version 1.21 and above.
@@ -81,7 +76,7 @@ You can create a payload using the following methods:
81
76
a JSON payload which defaults to POST.
82
77
* ` client.NewMultipartRequest(payload any, accept string) ` returns a new request with
83
78
a Multipart Form data payload which defaults to POST.
84
- * ` client.NewFormRequest(payload any, accept string) ` returns a new request with a
79
+ * ` client.NewFormRequest(payload any, accept string) ` returns a new request with a
85
80
Form data payload which defaults to POST.
86
81
87
82
For example,
@@ -147,7 +142,7 @@ type Client interface {
147
142
```
148
143
149
144
If you pass a context to the ` DoWithContext ` method, then the request can be
150
- cancelled using the context in addition to the timeout. Various options can be passed to
145
+ cancelled using the context in addition to the timeout. Various options can be passed to
151
146
modify each individual request when using the ` Do ` method:
152
147
153
148
* ` OptReqEndpoint(value string) ` sets the endpoint for the request
@@ -273,7 +268,7 @@ func Callback(event client.TextStreamEvent) error {
273
268
}
274
269
```
275
270
276
- The ` TextStreamEvent ` object has the following
271
+ The ` TextStreamEvent ` object has the following
277
272
278
273
If you return an error of type ` io.EOF ` from the callback, then the stream will be closed.
279
274
Similarly, if you return any other error the stream will be closed and the error returned.
0 commit comments