← back to kibbyd__adaptive-state

Function bodies 199 total

All specs Real LLM only Function bodies
main.isRuleContinuation function · go · L33-L51 (19 LOC)
go-controller/cmd/controller/main.go
func isRuleContinuation(input string) bool {
	lower := strings.ToLower(strings.TrimSpace(input))
	// Direct knock-knock continuation
	if strings.Contains(lower, "knock") {
		return true
	}
	// Punchline pattern: "<name> who <punchline>" (e.g. "Daniel who codes all night")
	// Must start with a word followed by "who" — not question-word "who is..."
	if !strings.HasPrefix(lower, "who") && strings.Contains(lower, " who ") && len(lower) < 60 {
		return true
	}
	// Very short reactions only (e.g. "haha", "good one", "lol", "nice one")
	// Exclude question-word starts ("who is...", "what is...")
	words := strings.Fields(lower)
	if len(words) <= 3 && !strings.HasPrefix(lower, "who") && !strings.HasPrefix(lower, "what") && !strings.HasPrefix(lower, "how") && !strings.HasPrefix(lower, "why") {
		return true
	}
	return false
}
main.envOr function · go · L555-L560 (6 LOC)
go-controller/cmd/controller/main.go
func envOr(key, fallback string) string {
	if v := os.Getenv(key); v != "" {
		return v
	}
	return fallback
}
main.envDuration function · go · L562-L569 (8 LOC)
go-controller/cmd/controller/main.go
func envDuration(key string, defaultSec int) time.Duration {
	if v := os.Getenv(key); v != "" {
		if sec, err := strconv.Atoi(v); err == nil && sec > 0 {
			return time.Duration(sec) * time.Second
		}
	}
	return time.Duration(defaultSec) * time.Second
}
main.main function · go · L19-L34 (16 LOC)
go-controller/cmd/fixture-export/main.go
func main() {
	dbPath := flag.String("db", "", "path to adaptive_state.db")
	last := flag.Int("last", 4, "number of most recent provenance rows to export")
	outPath := flag.String("out", "", "output fixture JSON path")
	flag.Parse()

	if *dbPath == "" || *outPath == "" {
		fmt.Fprintln(os.Stderr, "usage: fixture-export --db path/to/db --out path/to/fixture.json [--last N]")
		os.Exit(2)
	}

	if err := run(*dbPath, *last, *outPath); err != nil {
		fmt.Fprintf(os.Stderr, "error: %v\n", err)
		os.Exit(1)
	}
}
main.run function · go · L47-L128 (82 LOC)
go-controller/cmd/fixture-export/main.go
func run(dbPath string, last int, outPath string) error {
	store, err := state.NewStore(dbPath)
	if err != nil {
		return fmt.Errorf("open db: %w", err)
	}
	defer store.Close()

	db := store.DB()

	// Get initial state (first version with no parent)
	var initVersionID string
	err = db.QueryRow(
		`SELECT version_id FROM state_versions WHERE parent_id IS NULL ORDER BY created_at ASC LIMIT 1`,
	).Scan(&initVersionID)
	if err != nil {
		return fmt.Errorf("find initial state: %w", err)
	}

	startState, err := store.GetVersion(initVersionID)
	if err != nil {
		return fmt.Errorf("get initial state: %w", err)
	}

	// Query last N user_turn rows (DESC then reverse for chronological order)
	rows, err := db.Query(
		`SELECT signals_json, decision, reason FROM (
			SELECT signals_json, decision, reason, created_at FROM provenance_log
			WHERE trigger_type = 'user_turn'
			ORDER BY created_at DESC LIMIT ?
		) sub ORDER BY created_at ASC`, last,
	)
	if err != nil {
		return fmt.Errorf("query proven
main.buildFixture function · go · L134-L194 (61 LOC)
go-controller/cmd/fixture-export/main.go
func buildFixture(startState state.StateRecord, rows []gateRow) replay.Fixture {
	interactions := make([]replay.FixtureInteraction, len(rows))
	expected := make([]replay.FixtureExpectedResult, len(rows))

	for i, r := range rows {
		interactions[i] = replay.FixtureInteraction{
			TurnID:       r.Record.TurnID,
			Prompt:       r.Record.Prompt,
			ResponseText: r.Record.Response,
			Entropy:      r.Record.Entropy,
			Signals: replay.FixtureSignals{
				SentimentScore:      r.Record.Signals.SentimentScore,
				NoveltyScore:        r.Record.Signals.NoveltyScore,
				CoherenceScore:      r.Record.Signals.CoherenceScore,
				RiskFlag:            r.Record.Signals.RiskFlag,
				UserCorrection:      r.Record.Signals.UserCorrection,
				ToolFailure:         r.Record.Signals.ToolFailure,
				ConstraintViolation: r.Record.Signals.ConstraintViolation,
			},
			Evidence: []string{},
		}

		expected[i] = replay.FixtureExpectedResult{
			TurnID: r.Record.TurnID,
			Action: mapAction(r.Decision, r.Rea
main.mapAction function · go · L197-L211 (15 LOC)
go-controller/cmd/fixture-export/main.go
func mapAction(decision, reason string) string {
	switch decision {
	case "commit":
		return "commit"
	case "reject":
		if strings.Contains(reason, "eval rollback") {
			return "eval_rollback"
		}
		return "gate_reject"
	case "no_op":
		return "no_op"
	default:
		return decision
	}
}
Provenance: Repobility (https://repobility.com) — every score reproducible from /scan/
main.writeFixture function · go · L213-L225 (13 LOC)
go-controller/cmd/fixture-export/main.go
func writeFixture(fixture replay.Fixture, outPath string) error {
	data, err := json.MarshalIndent(fixture, "", "  ")
	if err != nil {
		return fmt.Errorf("marshal fixture: %w", err)
	}

	if err := os.WriteFile(outPath, data, 0644); err != nil {
		return fmt.Errorf("write %s: %w", outPath, err)
	}

	fmt.Printf("Wrote fixture to %s (%d bytes, %d interactions)\n", outPath, len(data), len(fixture.Interactions))
	return nil
}
main.main function · go · L18-L49 (32 LOC)
go-controller/cmd/inspect/main.go
func main() {
	dbPath := flag.String("db", "", "path to adaptive_state.db")
	last := flag.Int("last", 20, "show N most recent versions")
	version := flag.String("version", "", "show single version detail")
	segment := flag.String("segment", "", "filter segment breakdown to one segment")
	jsonOut := flag.Bool("json", false, "output as JSON instead of table")
	flag.Parse()

	if *dbPath == "" {
		fmt.Fprintln(os.Stderr, "usage: inspect --db path/to/adaptive_state.db [--last N] [--version id] [--segment name] [--json]")
		os.Exit(2)
	}

	store, err := state.NewStore(*dbPath)
	if err != nil {
		fmt.Fprintf(os.Stderr, "open db: %v\n", err)
		os.Exit(1)
	}
	defer store.Close()

	if *version != "" {
		if err := runDetailMode(store, *version, *segment, *jsonOut); err != nil {
			fmt.Fprintf(os.Stderr, "error: %v\n", err)
			os.Exit(1)
		}
	} else {
		if err := runListMode(store, *last, *segment, *jsonOut); err != nil {
			fmt.Fprintf(os.Stderr, "error: %v\n", err)
			os.Exit(1)
		}
	}
}
main.runListMode function · go · L67-L106 (40 LOC)
go-controller/cmd/inspect/main.go
func runListMode(store *state.Store, last int, segFilter string, jsonOut bool) error {
	versions, err := store.ListVersionsWithProvenance(last)
	if err != nil {
		return err
	}
	if len(versions) == 0 {
		fmt.Fprintln(os.Stderr, "no versions found")
		return nil
	}

	// Build rows (store returns DESC, reverse for chronological)
	listRows := make([]listRow, len(versions))
	for i, vp := range versions {
		segs := computeSegmentNorms(vp.StateVector, vp.SegmentMap)
		lr := listRow{
			VersionID: vp.VersionID,
			StateNorm: fullVectorNorm(vp.StateVector),
			Decision:  vp.Decision,
			Reason:    vp.Reason,
			Score:     verifierScore(vp.Decision, vp.Reason),
			CreatedAt: vp.CreatedAt.Format("2006-01-02T15:04:05Z"),
			Segments:  segs,
		}
		if gr := parseGateRecord(vp.SignalsJSON); gr != nil {
			dn := float64(gr.DeltaNorm)
			lr.DeltaNorm = &dn
		}
		if segFilter != "" {
			if v, ok := segs[segFilter]; ok {
				lr.SegNorm = &v
			}
		}
		listRows[len(versions)-1-i] = lr
	}

	if jsonOut {
	
main.printListTable function · go · L108-L144 (37 LOC)
go-controller/cmd/inspect/main.go
func printListTable(rows []listRow, segFilter string) error {
	if segFilter != "" {
		fmt.Printf("%-12s  %10s  %8s  %-10s  %6s  %-8s  %s\n",
			"Version", "State Norm", "Delta", "Decision", "Score", "Seg Norm", "Time")
		fmt.Printf("%-12s+-%10s+-%8s+-%-10s+-%6s+-%-8s+-%s\n",
			"------------", "----------", "--------", "----------", "------", "--------", "--------------------")
	} else {
		fmt.Printf("%-12s  %10s  %8s  %-10s  %6s  %s\n",
			"Version", "State Norm", "Delta", "Decision", "Score", "Time")
		fmt.Printf("%-12s+-%10s+-%8s+-%-10s+-%6s+-%s\n",
			"------------", "----------", "--------", "----------", "------", "--------------------")
	}

	for _, r := range rows {
		vid := shortID(r.VersionID)
		delta := "—"
		if r.DeltaNorm != nil {
			delta = fmt.Sprintf("%.4f", *r.DeltaNorm)
		}
		if segFilter != "" {
			segVal := "—"
			if r.SegNorm != nil {
				segVal = fmt.Sprintf("%.4f", *r.SegNorm)
			}
			fmt.Printf("%-12s  %10.4f  %8s  %-10s  %6.2f  %-8s  %s\n",
				vid, r.StateNorm,
main.runDetailMode function · go · L169-L220 (52 LOC)
go-controller/cmd/inspect/main.go
func runDetailMode(store *state.Store, versionID, segFilter string, jsonOut bool) error {
	vp, err := store.GetVersionWithProvenance(versionID)
	if err != nil {
		return err
	}

	segs := computeSegmentNorms(vp.StateVector, vp.SegmentMap)
	out := detailOutput{
		VersionID: vp.VersionID,
		ParentID:  vp.ParentID,
		CreatedAt: vp.CreatedAt.Format("2006-01-02T15:04:05Z"),
		StateNorm: fullVectorNorm(vp.StateVector),
		Decision:  vp.Decision,
		Reason:    vp.Reason,
		Score:     verifierScore(vp.Decision, vp.Reason),
		Segments:  segs,
	}

	if gr := parseGateRecord(vp.SignalsJSON); gr != nil {
		out.GateRecord = &gateDetail{
			DeltaNorm: gr.DeltaNorm,
			Entropy:   gr.Entropy,
			Vetoed:    gr.GateVetoed,
			SoftScore: gr.GateSoftScore,
		}
	}

	if jsonOut {
		return printJSON(out)
	}

	fmt.Printf("Version:    %s\n", out.VersionID)
	fmt.Printf("Parent:     %s\n", out.ParentID)
	fmt.Printf("Created:    %s\n", out.CreatedAt)
	fmt.Printf("State Norm: %.4f\n", out.StateNorm)
	fmt.Printf("Decis
main.fullVectorNorm function · go · L226-L232 (7 LOC)
go-controller/cmd/inspect/main.go
func fullVectorNorm(v [128]float32) float64 {
	var sum float64
	for _, f := range v {
		sum += float64(f) * float64(f)
	}
	return math.Sqrt(sum)
}
main.segmentNorm function · go · L234-L240 (7 LOC)
go-controller/cmd/inspect/main.go
func segmentNorm(v [128]float32, start, end int) float64 {
	var sum float64
	for i := start; i < end && i < len(v); i++ {
		sum += float64(v[i]) * float64(v[i])
	}
	return math.Sqrt(sum)
}
main.computeSegmentNorms function · go · L242-L249 (8 LOC)
go-controller/cmd/inspect/main.go
func computeSegmentNorms(v [128]float32, sm state.SegmentMap) map[string]float64 {
	return map[string]float64{
		"prefs":      segmentNorm(v, sm.Prefs[0], sm.Prefs[1]),
		"goals":      segmentNorm(v, sm.Goals[0], sm.Goals[1]),
		"heuristics": segmentNorm(v, sm.Heuristics[0], sm.Heuristics[1]),
		"risk":       segmentNorm(v, sm.Risk[0], sm.Risk[1]),
	}
}
Repobility (the analyzer behind this table) · https://repobility.com
main.verifierScore function · go · L255-L269 (15 LOC)
go-controller/cmd/inspect/main.go
func verifierScore(decision, reason string) float32 {
	switch decision {
	case "commit":
		return 1.0
	case "reject":
		if strings.Contains(reason, "eval rollback") {
			return -1.0
		}
		return 0.0
	case "no_op":
		return 0.5
	default:
		return 0.0
	}
}
main.parseGateRecord function · go · L275-L284 (10 LOC)
go-controller/cmd/inspect/main.go
func parseGateRecord(signalsJSON string) *logging.GateRecord {
	if signalsJSON == "" {
		return nil
	}
	var gr logging.GateRecord
	if err := json.Unmarshal([]byte(signalsJSON), &gr); err == nil && gr.TurnID != "" {
		return &gr
	}
	return nil
}
main.printSegments function · go · L286-L294 (9 LOC)
go-controller/cmd/inspect/main.go
func printSegments(segs map[string]float64, filter string) {
	order := []string{"prefs", "goals", "heuristics", "risk"}
	for _, name := range order {
		if filter != "" && name != filter {
			continue
		}
		fmt.Printf("  %-12s %.4f\n", name, segs[name])
	}
}
main.printJSON function · go · L296-L303 (8 LOC)
go-controller/cmd/inspect/main.go
func printJSON(v interface{}) error {
	data, err := json.MarshalIndent(v, "", "  ")
	if err != nil {
		return fmt.Errorf("marshal json: %w", err)
	}
	fmt.Println(string(data))
	return nil
}
main.shortID function · go · L305-L310 (6 LOC)
go-controller/cmd/inspect/main.go
func shortID(id string) string {
	if len(id) > 8 {
		return id[:8]
	}
	return id
}
main.main function · go · L20-L38 (19 LOC)
go-controller/cmd/replay/main.go
func main() {
	dbPath := flag.String("db", "", "path to adaptive_state.db (DB mode)")
	fixturePath := flag.String("fixture", "", "path to fixture JSON (fixture mode)")
	flag.Parse()

	if (*dbPath == "" && *fixturePath == "") || (*dbPath != "" && *fixturePath != "") {
		fmt.Fprintln(os.Stderr, "usage: replay --db path/to/adaptive_state.db")
		fmt.Fprintln(os.Stderr, "       replay --fixture path/to/fixture.json")
		os.Exit(2)
	}

	var exitCode int
	if *fixturePath != "" {
		exitCode = runFixtureMode(*fixturePath)
	} else {
		exitCode = runDBMode(*dbPath)
	}
	os.Exit(exitCode)
}
main.runDBMode function · go · L60-L134 (75 LOC)
go-controller/cmd/replay/main.go
func runDBMode(dbPath string) int {
	store, err := state.NewStore(dbPath)
	if err != nil {
		fmt.Fprintf(os.Stderr, "open db: %v\n", err)
		return 2
	}
	defer store.Close()

	db := store.DB()

	// Get initial state (first version with no parent)
	var initVersionID string
	err = db.QueryRow(
		`SELECT version_id FROM state_versions WHERE parent_id IS NULL ORDER BY created_at ASC LIMIT 1`,
	).Scan(&initVersionID)
	if err != nil {
		fmt.Fprintf(os.Stderr, "find initial state: %v\n", err)
		return 2
	}

	startState, err := store.GetVersion(initVersionID)
	if err != nil {
		fmt.Fprintf(os.Stderr, "get initial state: %v\n", err)
		return 2
	}

	// Query provenance_log for user_turn entries
	rows, err := db.Query(
		`SELECT version_id, signals_json, decision FROM provenance_log
		 WHERE trigger_type = 'user_turn' ORDER BY created_at ASC`,
	)
	if err != nil {
		fmt.Fprintf(os.Stderr, "query provenance: %v\n", err)
		return 2
	}
	defer rows.Close()

	var provRows []provenanceRow
	for rows.Next(
main.toInteraction function · go · L138-L179 (42 LOC)
go-controller/cmd/replay/main.go
func toInteraction(r provenanceRow) replay.Interaction {
	inter := replay.Interaction{
		TurnID: r.TurnID,
	}

	if r.SignalsJSON == "" {
		return inter
	}

	// Try GateRecord format first (new full-fidelity logging).
	// Discriminator: GateRecord has "turn_id" (snake_case), legacy has "TurnID" (PascalCase).
	var gr logging.GateRecord
	if err := json.Unmarshal([]byte(r.SignalsJSON), &gr); err == nil && gr.TurnID != "" {
		inter.TurnID = gr.TurnID
		inter.Prompt = gr.Prompt
		inter.ResponseText = gr.Response
		inter.Entropy = gr.Entropy
		inter.Signals = update.Signals{
			SentimentScore:      gr.Signals.SentimentScore,
			CoherenceScore:      gr.Signals.CoherenceScore,
			NoveltyScore:        gr.Signals.NoveltyScore,
			RiskFlag:            gr.Signals.RiskFlag,
			UserCorrection:      gr.Signals.UserCorrection,
			ToolFailure:         gr.Signals.ToolFailure,
			ConstraintViolation: gr.Signals.ConstraintViolation,
		}
		return inter
	}

	// Legacy format: heuristic reconstruction from js
All rows scored by the Repobility analyzer (https://repobility.com)
main.heuristicSignals function · go · L187-L205 (19 LOC)
go-controller/cmd/replay/main.go
func heuristicSignals(legacy legacySignalsJSON) update.Signals {
	var s update.Signals

	// Approximate sentiment from response word count
	if legacy.ResponseText != "" {
		wordCount := float32(len(strings.Fields(legacy.ResponseText)))
		s.SentimentScore = wordCount / 100.0
		if s.SentimentScore > 1.0 {
			s.SentimentScore = 1.0
		}
	}

	// Approximate novelty from entropy
	if legacy.Entropy > 0 {
		s.NoveltyScore = legacy.Entropy
	}

	return s
}
main.runFixtureMode function · go · L211-L234 (24 LOC)
go-controller/cmd/replay/main.go
func runFixtureMode(path string) int {
	f, err := replay.LoadFixture(path)
	if err != nil {
		fmt.Fprintf(os.Stderr, "load fixture: %v\n", err)
		return 2
	}

	startState := f.StartState.ToStateRecord()
	config := f.Config.ToReplayConfig()

	interactions := make([]replay.Interaction, len(f.Interactions))
	for i := range f.Interactions {
		interactions[i] = f.Interactions[i].ToInteraction()
	}

	results := replay.Replay(startState, interactions, config)

	expected := make([]string, len(f.ExpectedResults))
	for i, e := range f.ExpectedResults {
		expected[i] = e.Action
	}

	return printComparison(results, expected, nil)
}
main.printComparison function · go · L239-L275 (37 LOC)
go-controller/cmd/replay/main.go
func printComparison(results []replay.ReplayResult, expected []string, turnIDs []string) int {
	fmt.Printf("%-12s| %-15s| %-15s| %s\n", "Turn", "Expected", "Replayed", "Match")
	fmt.Printf("%-12s+%-15s+%-15s+%s\n",
		"------------", "----------------", "----------------", "------")

	matches := 0
	total := len(results)
	if len(expected) < total {
		total = len(expected)
	}

	for i := 0; i < total; i++ {
		turnID := results[i].TurnID
		if turnIDs != nil && i < len(turnIDs) {
			turnID = turnIDs[i]
		}

		exp := expected[i]
		got := results[i].Action
		match := "DIFF"

		if actionsMatch(exp, got) {
			match = "OK"
			matches++
		}

		fmt.Printf("%-12s| %-15s| %-15s| %s\n", turnID, exp, got, match)
	}

	diverge := total - matches
	fmt.Printf("\nSummary: %d total, %d match, %d diverge\n", total, matches, diverge)

	if diverge > 0 {
		return 1
	}
	return 0
}
main.actionsMatch function · go · L279-L287 (9 LOC)
go-controller/cmd/replay/main.go
func actionsMatch(expected, replayed string) bool {
	if expected == replayed {
		return true
	}
	if expected == "reject" && (replayed == "gate_reject" || replayed == "eval_rollback") {
		return true
	}
	return false
}
adaptive.codecServiceClient.Generate method · go · L50-L58 (9 LOC)
go-controller/gen/adaptive/adaptive_grpc.pb.go
func (c *codecServiceClient) Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GenerateResponse)
	err := c.cc.Invoke(ctx, CodecService_Generate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}
adaptive.codecServiceClient.Embed method · go · L60-L68 (9 LOC)
go-controller/gen/adaptive/adaptive_grpc.pb.go
func (c *codecServiceClient) Embed(ctx context.Context, in *EmbedRequest, opts ...grpc.CallOption) (*EmbedResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EmbedResponse)
	err := c.cc.Invoke(ctx, CodecService_Embed_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}
adaptive.codecServiceClient.Search method · go · L70-L78 (9 LOC)
go-controller/gen/adaptive/adaptive_grpc.pb.go
func (c *codecServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SearchResponse)
	err := c.cc.Invoke(ctx, CodecService_Search_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}
adaptive.codecServiceClient.StoreEvidence method · go · L80-L88 (9 LOC)
go-controller/gen/adaptive/adaptive_grpc.pb.go
func (c *codecServiceClient) StoreEvidence(ctx context.Context, in *StoreEvidenceRequest, opts ...grpc.CallOption) (*StoreEvidenceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(StoreEvidenceResponse)
	err := c.cc.Invoke(ctx, CodecService_StoreEvidence_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}
Repobility · code-quality intelligence · https://repobility.com
adaptive.codecServiceClient.WebSearch method · go · L90-L98 (9 LOC)
go-controller/gen/adaptive/adaptive_grpc.pb.go
func (c *codecServiceClient) WebSearch(ctx context.Context, in *WebSearchRequest, opts ...grpc.CallOption) (*WebSearchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(WebSearchResponse)
	err := c.cc.Invoke(ctx, CodecService_WebSearch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}
adaptive.RegisterCodecServiceServer function · go · L146-L155 (10 LOC)
go-controller/gen/adaptive/adaptive_grpc.pb.go
func RegisterCodecServiceServer(s grpc.ServiceRegistrar, srv CodecServiceServer) {
	// If the following call panics, it indicates UnimplementedCodecServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&CodecService_ServiceDesc, srv)
}
adaptive.GenerateRequest.Reset method · go · L35-L40 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateRequest) Reset() {
	*x = GenerateRequest{}
	mi := &file_adaptive_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}
adaptive.GenerateRequest.ProtoReflect method · go · L48-L58 (11 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateRequest) ProtoReflect() protoreflect.Message {
	mi := &file_adaptive_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}
adaptive.GenerateRequest.GetPrompt method · go · L65-L70 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateRequest) GetPrompt() string {
	if x != nil {
		return x.Prompt
	}
	return ""
}
adaptive.GenerateRequest.GetStateVector method · go · L72-L77 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateRequest) GetStateVector() []float32 {
	if x != nil {
		return x.StateVector
	}
	return nil
}
adaptive.GenerateRequest.GetEvidence method · go · L79-L84 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateRequest) GetEvidence() []string {
	if x != nil {
		return x.Evidence
	}
	return nil
}
adaptive.GenerateRequest.GetContext method · go · L86-L91 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateRequest) GetContext() []int64 {
	if x != nil {
		return x.Context
	}
	return nil
}
Provenance: Repobility (https://repobility.com) — every score reproducible from /scan/
adaptive.GenerateResponse.Reset method · go · L103-L108 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateResponse) Reset() {
	*x = GenerateResponse{}
	mi := &file_adaptive_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}
adaptive.GenerateResponse.ProtoReflect method · go · L116-L126 (11 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateResponse) ProtoReflect() protoreflect.Message {
	mi := &file_adaptive_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}
adaptive.GenerateResponse.GetText method · go · L133-L138 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateResponse) GetText() string {
	if x != nil {
		return x.Text
	}
	return ""
}
adaptive.GenerateResponse.GetEntropy method · go · L140-L145 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateResponse) GetEntropy() float32 {
	if x != nil {
		return x.Entropy
	}
	return 0
}
adaptive.GenerateResponse.GetLogits method · go · L147-L152 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateResponse) GetLogits() []float32 {
	if x != nil {
		return x.Logits
	}
	return nil
}
adaptive.GenerateResponse.GetContext method · go · L154-L159 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *GenerateResponse) GetContext() []int64 {
	if x != nil {
		return x.Context
	}
	return nil
}
adaptive.EmbedRequest.Reset method · go · L168-L173 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *EmbedRequest) Reset() {
	*x = EmbedRequest{}
	mi := &file_adaptive_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}
adaptive.EmbedRequest.ProtoReflect method · go · L181-L191 (11 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *EmbedRequest) ProtoReflect() protoreflect.Message {
	mi := &file_adaptive_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}
Repobility (the analyzer behind this table) · https://repobility.com
adaptive.EmbedRequest.GetText method · go · L198-L203 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *EmbedRequest) GetText() string {
	if x != nil {
		return x.Text
	}
	return ""
}
adaptive.EmbedResponse.Reset method · go · L212-L217 (6 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *EmbedResponse) Reset() {
	*x = EmbedResponse{}
	mi := &file_adaptive_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}
adaptive.EmbedResponse.ProtoReflect method · go · L225-L235 (11 LOC)
go-controller/gen/adaptive/adaptive.pb.go
func (x *EmbedResponse) ProtoReflect() protoreflect.Message {
	mi := &file_adaptive_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}
page 1 / 4next ›