Skip to content

Commit

Permalink
chore(sdk-go): Rename message -> initialPrompt (#79)
Browse files Browse the repository at this point in the history
* chore(sdk-go): Rename message -> initialPrompt

* chore(sdk-go): Remove summary from OnStatusChange

* chore(sdk-go): Support run.interactive flag
  • Loading branch information
johnjcsmith authored Nov 10, 2024
1 parent d6a60bb commit a7487c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdk-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ The following code will create an [Inferable run](https://docs.inferable.ai/page
```go
run, err := client.CreateRun(inferable.CreateRunInput{
Message: "Say hello to John Smith",
InitialPrompt: "Say hello to John Smith",
// Optional: Explicitly attach the functions (All functions attached by default)
AttachedFunctions: []*inferable.FunctionReference{
inferable.FunctionReference{
Expand Down
4 changes: 2 additions & 2 deletions sdk-go/inferable.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ type OnStatusChangeInput struct {
Status string `json:"status"`
RunId string `json:"runId"`
Result interface{} `json:"result"`
Summary string `json:"summary"`
Metadata interface{} `json:"metadata"`
}

Expand All @@ -87,12 +86,13 @@ type OnStatusChange struct {

type CreateRunInput struct {
AttachedFunctions []*FunctionReference `json:"attachedFunctions,omitempty"`
Message string `json:"message"`
InitialPrompt string `json:"initialPrompt"`
OnStatusChange *OnStatusChange `json:"onStatusChange,omitempty"`
ResultSchema interface{} `json:"resultSchema,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Template *RunTemplate `json:"template,omitempty"`
ReasoningTraces bool `json:"reasoningTraces"`
Interactive bool `json:"interactive"`
CallSummarization bool `json:"callSummarization"`
}

Expand Down
2 changes: 1 addition & 1 deletion sdk-go/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestInferableE2E(t *testing.T) {
client.Default.Start()

run, err := client.CreateRun(CreateRunInput{
Message: "Say hello to John Smith",
InitialPrompt: "Say hello to John Smith",
AttachedFunctions: []*FunctionReference{
sayHello,
},
Expand Down

0 comments on commit a7487c2

Please sign in to comment.