v1alpha1

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the arcadia v1alpha1 API group +kubebuilder:object:generate=true +groupName=chain.arcadia.kubeagi.k8s.com.cn

Index

Constants

View Source
const (
	Group   = "chain.arcadia.kubeagi.k8s.com.cn"
	Version = "v1alpha1"
)
View Source
const DefaultConversionWindowSize = 5

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type APIChain added in v0.2.0

type APIChain struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   APIChainSpec   `json:"spec,omitempty"`
	Status APIChainStatus `json:"status,omitempty"`
}

APIChain is a chain that makes API calls and summarizes the responses to answer a question.

func (*APIChain) DeepCopy added in v0.2.0

func (in *APIChain) DeepCopy() *APIChain

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIChain.

func (*APIChain) DeepCopyInto added in v0.2.0

func (in *APIChain) DeepCopyInto(out *APIChain)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*APIChain) DeepCopyObject added in v0.2.0

func (in *APIChain) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*APIChain) SetRef added in v0.2.0

func (c *APIChain) SetRef()

type APIChainList added in v0.2.0

type APIChainList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []APIChain `json:"items"`
}

APIChainList contains a list of APIChain

func (*APIChainList) DeepCopy added in v0.2.0

func (in *APIChainList) DeepCopy() *APIChainList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIChainList.

func (*APIChainList) DeepCopyInto added in v0.2.0

func (in *APIChainList) DeepCopyInto(out *APIChainList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*APIChainList) DeepCopyObject added in v0.2.0

func (in *APIChainList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type APIChainSpec added in v0.2.0

type APIChainSpec struct {
	v1alpha1.CommonSpec `json:",inline"`

	CommonChainConfig `json:",inline"`
	// APIDoc is the api doc for this chain, "api_docs"
	APIDoc string `json:"apiDoc"`
}

APIChainSpec defines the desired state of APIChain

func (*APIChainSpec) DeepCopy added in v0.2.0

func (in *APIChainSpec) DeepCopy() *APIChainSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIChainSpec.

func (*APIChainSpec) DeepCopyInto added in v0.2.0

func (in *APIChainSpec) DeepCopyInto(out *APIChainSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type APIChainStatus added in v0.2.0

type APIChainStatus struct {
	// ObservedGeneration is the last observed generation.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// ConditionedStatus is the current status
	v1alpha1.ConditionedStatus `json:",inline"`
}

APIChainStatus defines the observed state of APIChain

func (*APIChainStatus) DeepCopy added in v0.2.0

func (in *APIChainStatus) DeepCopy() *APIChainStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIChainStatus.

func (*APIChainStatus) DeepCopyInto added in v0.2.0

func (in *APIChainStatus) DeepCopyInto(out *APIChainStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CommonChainConfig

type CommonChainConfig struct {
	// MaxNumberOfConcurrent represents the max number of concurrent calls done simultaneously to
	// the llm chain.Only 1 by default
	// +kubebuilder:default=1
	MaxNumberOfConccurent int `json:"maxNumberOfConccurent,omitempty"`

	// for memory
	Memory Memory `json:"memory,omitempty"`

	// Model is the model to use in an llm call.like `gpt-3.5-turbo` or `chatglm_turbo`
	// Usually this value is just empty
	Model string `json:"model,omitempty"`
	// MaxTokens is the maximum number of tokens to generate to use in a llm call.
	// +kubebuilder:default=2048
	MaxTokens int `json:"maxTokens,omitempty"`
	// Temperature is the temperature for sampling to use in a llm call, between 0 and 1.
	//+kubebuilder:validation:Minimum=0
	//+kubebuilder:validation:Maximum=1
	//+kubebuilder:default=0.7
	Temperature *float64 `json:"temperature,omitempty"`
	// StopWords is a list of words to stop on to use in a llm call.
	StopWords []string `json:"stopWords,omitempty"`
	// TopK is the number of tokens to consider for top-k sampling in a llm call.
	TopK *int `json:"topK,omitempty"`
	// TopP is the cumulative probability for top-p sampling in a llm call.
	TopP *float64 `json:"topP,omitempty"`
	// Seed is a seed for deterministic sampling in a llm call.
	Seed int `json:"seed,omitempty"`
	// MinLength is the minimum length of the generated text in a llm call.
	MinLength int `json:"minLength,omitempty"`
	// MaxLength is the maximum length of the generated text in a llm call.
	// +kubebuilder:validation:Minimum=10
	// +kubebuilder:default=2048
	MaxLength int `json:"maxLength,omitempty"`
	// RepetitionPenalty is the repetition penalty for sampling in a llm call.
	RepetitionPenalty *float64 `json:"repetitionPenalty,omitempty"`
}

func (*CommonChainConfig) DeepCopy

func (in *CommonChainConfig) DeepCopy() *CommonChainConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonChainConfig.

func (*CommonChainConfig) DeepCopyInto

func (in *CommonChainConfig) DeepCopyInto(out *CommonChainConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LLMChain

type LLMChain struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   LLMChainSpec   `json:"spec,omitempty"`
	Status LLMChainStatus `json:"status,omitempty"`
}

LLMChain is the Schema for the LLMChains API

func (*LLMChain) DeepCopy

func (in *LLMChain) DeepCopy() *LLMChain

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LLMChain.

func (*LLMChain) DeepCopyInto

func (in *LLMChain) DeepCopyInto(out *LLMChain)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LLMChain) DeepCopyObject

func (in *LLMChain) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*LLMChain) SetRef

func (c *LLMChain) SetRef()

type LLMChainList

type LLMChainList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []LLMChain `json:"items"`
}

LLMChainList contains a list of LLMChain

func (*LLMChainList) DeepCopy

func (in *LLMChainList) DeepCopy() *LLMChainList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LLMChainList.

func (*LLMChainList) DeepCopyInto

func (in *LLMChainList) DeepCopyInto(out *LLMChainList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LLMChainList) DeepCopyObject

func (in *LLMChainList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LLMChainSpec

type LLMChainSpec struct {
	v1alpha1.CommonSpec `json:",inline"`

	CommonChainConfig `json:",inline"`
}

LLMChainSpec defines the desired state of LLMChain

func (*LLMChainSpec) DeepCopy

func (in *LLMChainSpec) DeepCopy() *LLMChainSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LLMChainSpec.

func (*LLMChainSpec) DeepCopyInto

func (in *LLMChainSpec) DeepCopyInto(out *LLMChainSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LLMChainStatus

type LLMChainStatus struct {
	// ObservedGeneration is the last observed generation.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// ConditionedStatus is the current status
	v1alpha1.ConditionedStatus `json:",inline"`
}

LLMChainStatus defines the observed state of LLMChain

func (*LLMChainStatus) DeepCopy

func (in *LLMChainStatus) DeepCopy() *LLMChainStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LLMChainStatus.

func (*LLMChainStatus) DeepCopyInto

func (in *LLMChainStatus) DeepCopyInto(out *LLMChainStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Memory

type Memory struct {
	// MaxTokenLimit is the maximum number of tokens to keep in memory. Can only use MaxTokenLimit or ConversionWindowSize.
	MaxTokenLimit int `json:"maxTokenLimit,omitempty"`
	// ConversionWindowSize is the maximum number of conversation rounds in memory.Can only use MaxTokenLimit or ConversionWindowSize.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=30
	// +kubebuilder:default=5
	ConversionWindowSize *int `json:"conversionWindowSize,omitempty"`
}

func (*Memory) DeepCopy

func (in *Memory) DeepCopy() *Memory

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Memory.

func (*Memory) DeepCopyInto

func (in *Memory) DeepCopyInto(out *Memory)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RetrievalQAChain

type RetrievalQAChain struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RetrievalQAChainSpec   `json:"spec,omitempty"`
	Status RetrievalQAChainStatus `json:"status,omitempty"`
}

RetrievalQAChain is a chain used for question-answering against a retriever. First the chain gets documents from the retriever, then the documents and the query are used as input to another chain.Typically, that chain combines the documents into a prompt that is sent to a llm.

func (*RetrievalQAChain) DeepCopy

func (in *RetrievalQAChain) DeepCopy() *RetrievalQAChain

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetrievalQAChain.

func (*RetrievalQAChain) DeepCopyInto

func (in *RetrievalQAChain) DeepCopyInto(out *RetrievalQAChain)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RetrievalQAChain) DeepCopyObject

func (in *RetrievalQAChain) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*RetrievalQAChain) SetRef

func (c *RetrievalQAChain) SetRef()

type RetrievalQAChainList

type RetrievalQAChainList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RetrievalQAChain `json:"items"`
}

RetrievalQAChainList contains a list of RetrievalQAChain

func (*RetrievalQAChainList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetrievalQAChainList.

func (*RetrievalQAChainList) DeepCopyInto

func (in *RetrievalQAChainList) DeepCopyInto(out *RetrievalQAChainList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RetrievalQAChainList) DeepCopyObject

func (in *RetrievalQAChainList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RetrievalQAChainSpec

type RetrievalQAChainSpec struct {
	v1alpha1.CommonSpec `json:",inline"`

	CommonChainConfig `json:",inline"`
}

RetrievalQAChainSpec defines the desired state of RetrievalQAChain

func (*RetrievalQAChainSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetrievalQAChainSpec.

func (*RetrievalQAChainSpec) DeepCopyInto

func (in *RetrievalQAChainSpec) DeepCopyInto(out *RetrievalQAChainSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RetrievalQAChainStatus

type RetrievalQAChainStatus struct {
	// ObservedGeneration is the last observed generation.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// ConditionedStatus is the current status
	v1alpha1.ConditionedStatus `json:",inline"`
}

RetrievalQAChainStatus defines the observed state of RetrievalQAChain

func (*RetrievalQAChainStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetrievalQAChainStatus.

func (*RetrievalQAChainStatus) DeepCopyInto

func (in *RetrievalQAChainStatus) DeepCopyInto(out *RetrievalQAChainStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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