removed Heartbeat, Show, and Version client methods from Example_basic.
This commit is contained in:
parent
799ba11edc
commit
f98f113b75
@ -51,23 +51,6 @@ func Example_basic() {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a heartbeat from the server. If no error is returned, we know the server is up.
|
|
||||||
err = client.Heartbeat(ctx)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the version of the server
|
|
||||||
version, err := client.Version(ctx)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we get an empty version, something is wrong
|
|
||||||
if version == "" {
|
|
||||||
log.Fatal("version is empty")
|
|
||||||
}
|
|
||||||
|
|
||||||
// List all the models on the server as tags
|
// List all the models on the server as tags
|
||||||
tags, err := client.List(ctx)
|
tags, err := client.List(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -87,18 +70,6 @@ func Example_basic() {
|
|||||||
// Get the first model in the list
|
// Get the first model in the list
|
||||||
model := tags.Models[0].Model
|
model := tags.Models[0].Model
|
||||||
|
|
||||||
request := api.ShowRequest{
|
|
||||||
Model: model,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show the model
|
|
||||||
show, err := client.Show(ctx, &request)
|
|
||||||
|
|
||||||
// if we get an empty show, something is wrong
|
|
||||||
if show == nil {
|
|
||||||
log.Fatal("show is empty")
|
|
||||||
}
|
|
||||||
|
|
||||||
// now we're getting ready for the big show. CHATTING WITH THE TINIEST MODEL ON THE SERVER!
|
// now we're getting ready for the big show. CHATTING WITH THE TINIEST MODEL ON THE SERVER!
|
||||||
|
|
||||||
// Create a new chat message to send to the server. Role must be defined and can be "user", system", or a third one that I forget.
|
// Create a new chat message to send to the server. Role must be defined and can be "user", system", or a third one that I forget.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user