Skip to content

[Go] Incorrect dotprompt markers #3710

@janishorsts

Description

@janishorsts

Describe the bug

In golang, the Genkit examples and implementation DO NOT conform to the dotprompt implementation.

Go's dotprompt uses <<<dotprompt:...>> for template markers, not {{...}} - https://github.com/google/dotprompt/blob/8d056e0272541dc71a0e8a605a216f83f9bce302/go/dotprompt/parse.go#L37-L49.

To Reproduce

Based on the Genkit go documentation, code samples and implementation.

---
model: "gemini-1.5-flash"
description: "Summarize the input text."
input:
  schema:
    type: object
    properties:
      text:
        type: string
        description: "The text to summarize"
    required:
      - text
output:
  format: "text"
---
{{role: "user"}}
Please summarize the following text.

{{text}}

{{role: "model"}}
Yes, I understand. I will summarize it.

Expected behavior

The actual implementation by the dotprompt package.

https://github.com/google/dotprompt/blob/main/go/example/example.prompt

---
model: "gemini-1.5-flash"
description: "Summarize the input text."
input:
  schema:
    type: object
    properties:
      text:
        type: string
        description: "The text to summarize"
    required:
      - text
output:
  format: "text"
---
<<<dotprompt:role:user>>>
Please summarize the following text.

{{text}}

<<<dotprompt:role:model>>>
Yes, I understand. I will summarize it.

Runtime (please complete the following information):

  • OS: MacOS
  • Version: 26

Go version

go version go1.25.2 darwin/arm64

Additional context

Relates to #3711

Metadata

Metadata

Labels

bugSomething isn't workinggo

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions