Skip to content

Commit

Permalink
Release v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 1, 2023
1 parent 18e2834 commit 14b632b
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 67 deletions.
102 changes: 51 additions & 51 deletions client/client.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package client

import (
core "github.com/cohere-ai/cohere-go/core"
core "github.com/cohere-ai/cohere-go/v2/core"
http "net/http"
)

Expand Down
4 changes: 2 additions & 2 deletions core/client_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (c *ClientOptions) ToHeader() http.Header {
func (c *ClientOptions) cloneHeader() http.Header {
headers := c.HTTPHeader.Clone()
headers.Set("X-Fern-Language", "Go")
headers.Set("X-Fern-SDK-Name", "github.com/cohere-ai/cohere-go")
headers.Set("X-Fern-SDK-Version", "2.0.0")
headers.Set("X-Fern-SDK-Name", "github.com/cohere-ai/cohere-go/v2")
headers.Set("X-Fern-SDK-Version", "v2.0.0")
return headers
}
2 changes: 1 addition & 1 deletion dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package api
import (
json "encoding/json"
fmt "fmt"
core "github.com/cohere-ai/cohere-go/core"
core "github.com/cohere-ai/cohere-go/v2/core"
time "time"
)

Expand Down
16 changes: 8 additions & 8 deletions dataset/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package dataset
import (
context "context"
fmt "fmt"
coherego "github.com/cohere-ai/cohere-go"
core "github.com/cohere-ai/cohere-go/core"
v2 "github.com/cohere-ai/cohere-go/v2"
core "github.com/cohere-ai/cohere-go/v2/core"
http "net/http"
url "net/url"
time "time"
Expand All @@ -30,7 +30,7 @@ func NewClient(opts ...core.ClientOption) *Client {
}
}

func (c *Client) Get(ctx context.Context, request *coherego.DatasetGetRequest) (*coherego.DatasetGetResponse, error) {
func (c *Client) Get(ctx context.Context, request *v2.DatasetGetRequest) (*v2.DatasetGetResponse, error) {
baseURL := "https://api.cohere.ai"
if c.baseURL != "" {
baseURL = c.baseURL
Expand All @@ -57,7 +57,7 @@ func (c *Client) Get(ctx context.Context, request *coherego.DatasetGetRequest) (
endpointURL += "?" + queryParams.Encode()
}

var response *coherego.DatasetGetResponse
var response *v2.DatasetGetResponse
if err := c.caller.Call(
ctx,
&core.CallParams{
Expand All @@ -72,14 +72,14 @@ func (c *Client) Get(ctx context.Context, request *coherego.DatasetGetRequest) (
return response, nil
}

func (c *Client) UsageGet(ctx context.Context) (*coherego.DatasetUsageGetResponse, error) {
func (c *Client) UsageGet(ctx context.Context) (*v2.DatasetUsageGetResponse, error) {
baseURL := "https://api.cohere.ai"
if c.baseURL != "" {
baseURL = c.baseURL
}
endpointURL := baseURL + "/" + "v1/dataset/usage"

var response *coherego.DatasetUsageGetResponse
var response *v2.DatasetUsageGetResponse
if err := c.caller.Call(
ctx,
&core.CallParams{
Expand All @@ -94,14 +94,14 @@ func (c *Client) UsageGet(ctx context.Context) (*coherego.DatasetUsageGetRespons
return response, nil
}

func (c *Client) IdGet(ctx context.Context, id string) (*coherego.DatasetIdGetResponse, error) {
func (c *Client) IdGet(ctx context.Context, id string) (*v2.DatasetIdGetResponse, error) {
baseURL := "https://api.cohere.ai"
if c.baseURL != "" {
baseURL = c.baseURL
}
endpointURL := fmt.Sprintf(baseURL+"/"+"v1/dataset/%v", id)

var response *coherego.DatasetIdGetResponse
var response *v2.DatasetIdGetResponse
if err := c.caller.Call(
ctx,
&core.CallParams{
Expand Down
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package api

import (
json "encoding/json"
core "github.com/cohere-ai/cohere-go/core"
core "github.com/cohere-ai/cohere-go/v2/core"
)

type BadRequestError struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/cohere-ai/cohere-go
module github.com/cohere-ai/cohere-go/v2

go 1.18

Expand Down
4 changes: 2 additions & 2 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package api
import (
json "encoding/json"
fmt "fmt"
core "github.com/cohere-ai/cohere-go/core"
core "github.com/cohere-ai/cohere-go/v2/core"
time "time"
)

Expand Down Expand Up @@ -256,7 +256,7 @@ type GenerateRequest struct {
// Defaults to `0`, min value of `0`, max value of `500`.
K *int `json:"k,omitempty"`
// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
// Defaults to `0`. min value of `0.01`, max value of `0.99`.
// Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
P *float64 `json:"p,omitempty"`
// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.'
FrequencyPenalty *float64 `json:"frequency_penalty,omitempty"`
Expand Down

0 comments on commit 14b632b

Please sign in to comment.