Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Go] make core the home of codegen #245

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions go/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Run the npm script that generates JSON Schemas from the zod types
// in the *.ts files. It writes the result to genkit-tools/genkit-schema.json
//go:generate npm --prefix ../../genkit-tools run export:schemas

// Run the Go code generator on the file just created.
//go:generate go run ../internal/cmd/jsonschemagen -outdir .. -config schemas.config ../../genkit-tools/genkit-schema.json core

// Package core implements Genkit actions, flows and other essential machinery.
// This package is primarily intended for genkit internals and for plugins.
// Applications using genkit should use the genkit package.
Expand Down
2 changes: 0 additions & 2 deletions go/genkit/schemas.config → go/core/schemas.config
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ FlowInvokeEnvelopeMessageRunScheduled omit
Operation omit

FlowStateExecution name flowExecution
FlowStateExecution pkg core
FlowStateExecution.startTime type gtime.Milliseconds
FlowStateExecution.endTime type gtime.Milliseconds

FlowError name flowError
FlowError pkg core

GenerateRequest.messages doc
Messages is a list of messages to pass to the model. The first n-1 Messages
Expand Down
17 changes: 0 additions & 17 deletions go/genkit/gen.go

This file was deleted.

7 changes: 0 additions & 7 deletions go/genkit/genkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Run the npm script that generates JSON Schemas from the zod types
// in the *.ts files. It writes the result to genkit-tools/genkit-schema.json
//go:generate npm --prefix ../../genkit-tools run export:schemas

// Run the Go code generator on the file just created.
//go:generate go run ../internal/cmd/jsonschemagen -outdir .. -config schemas.config ../../genkit-tools/genkit-schema.json genkit

// Package genkit provides Genkit functionality for application developers.
package genkit

Expand Down
Loading