Skip to content

LangfusePrompt

NexusLabs.Needlr.AgentFramework.Langfuse

LangfusePrompt Class

A prompt fetched from Langfuse prompt management. Use Text for a text prompt's content, and pass the prompt to SetPrompt(LangfusePrompt) to link generations to the exact version that was used.

public sealed record LangfusePrompt : System.IEquatable<NexusLabs.Needlr.AgentFramework.Langfuse.LangfusePrompt>

Inheritance System.Object 🡒 LangfusePrompt

Implements System.IEquatable<LangfusePrompt>

Properties

LangfusePrompt.Labels Property

Gets the labels applied to this version (for example production).

public System.Collections.Generic.IReadOnlyList<string> Labels { get; init; }

Property Value

System.Collections.Generic.IReadOnlyList<System.String>

LangfusePrompt.Name Property

Gets the prompt name.

public string Name { get; init; }

Property Value

System.String

LangfusePrompt.Prompt Property

Gets the raw prompt content: a JSON string for a text prompt, or a JSON array of messages for a chat prompt.

public System.Text.Json.JsonElement Prompt { get; init; }

Property Value

System.Text.Json.JsonElement

LangfusePrompt.Tags Property

Gets the prompt tags.

public System.Collections.Generic.IReadOnlyList<string> Tags { get; init; }

Property Value

System.Collections.Generic.IReadOnlyList<System.String>

LangfusePrompt.Text Property

Gets the text content for a text prompt, or null for a chat prompt (use Prompt for chat messages).

public string? Text { get; }

Property Value

System.String

LangfusePrompt.Type Property

Gets the prompt type (text or chat).

public string Type { get; init; }

Property Value

System.String

LangfusePrompt.Version Property

Gets the prompt version.

public int Version { get; init; }

Property Value

System.Int32