example

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSkillAnalysisChain

func CreateSkillAnalysisChain() (*gochains.BaseChain, error)

CreateSkillAnalysisChain creates a structured chain for skill analysis

func GenerateSimpleAnswer

func GenerateSimpleAnswer(
	ctx context.Context,
	clientChan chan<- event.ProgressEvent,
) (interface{}, error)
func CreateQuestionGeneratorChain() (*gochains.BaseChain, error) {
	template := `Generate interview questions for the following requirements:

Position: {{.position}} Seek Traits: {seek_traits} Number of Questions: {number_of_questions}

Create relevant interview questions that assess the candidate's fit for this role.`

	responseSchemas := []outputparser.ResponseSchema{
		{Name: "questions", Description: "List of interview questions separated by newlines"},
		{Name: "difficulty_level", Description: "Overall difficulty level (Beginner/Intermediate/Advanced)"},
		{Name: "focus_areas", Description: "Main focus areas covered by the questions"},
		{Name: "estimated_time", Description: "Estimated time needed for the interview"},
	}

	return gochains.NewChainBuilder().
		WithTemplate(template).
		WithParams([]string{"position", "seek_traits", "number_of_questions"}).
		WithStructuredOutput(responseSchemas).
		WithModel(llmmodels.ProviderOpenaAI, "gpt-4-turbo-preview").
		WithMaxTokens(1500).
		WithTemperature(0.3).
		Build()
}

// CreateSimpleChain creates a regular chain (backwards compatible)

func CreateSimpleChain(template string, params []string) (*gochains.BaseChain, error) {
	return gochains.NewChainBuilder().
		WithTemplate(template).
		WithParams(params).
		WithModel(llmmodels.ProviderOpenaAI, "gpt-3.5-turbo").
		WithMaxTokens(800).
		WithTemperature(0.7).
		Build()
}

GenerateSimpleAnswer demonstrates how to generate a simple, non-structured text answer.

func GenerateSkillsAnalysis

func GenerateSkillsAnalysis(
	ctx context.Context,
	request SkillGeneratorRequest,
	userID string,
	clientChan chan<- event.ProgressEvent,
) (map[string]any, error)

GenerateSkillsAnalysis generates skills analysis using structured output

Types

type QuestionGeneratorRequest

type QuestionGeneratorRequest struct {
	Position, SeekTraits string
	NumberOfQuestions    int
}

type SimpleAnswerRequest

type SimpleAnswerRequest struct {
	Topic string
}

type SkillGeneratorRequest

type SkillGeneratorRequest struct {
	Position       string
	JobDescription string
	CompanyValues  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL