package
0.0.0-20250219065129-52aed497bc00
Repository: https://github.com/infinilabs/coco-server.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
Apply executes the chain for each of the inputs asynchronously.
Call is the standard function used for executing chains.
LoadCondenseQuestionGenerator chain is used to generate a new question for the sake of retrieval.
LoadMapReduceQA loads a refine documents chain for question answering.
LoadMapReduceSummarization loads a map reduce documents chain for summarization of documents.
LoadMapRerankQA loads a map rerank documents chain for question answering.
LoadRefineQA loads a refine documents chain for question answering.
LoadRefineSummarization loads a refine documents chain for summarization of documents.
LoadStuffQA loads a StuffDocuments chain with default prompts for the llm chain.
LoadStuffSummarization loads a summarization chain that stuffs all documents given into the prompt.
NewAPIChain creates a new APIChain object.
NewConstitutional creates a new Constitutional chain.
NewConstitutionalPrinciple creates a new ConstitutionalPrinciple.
No description provided by the author
NewConversationalRetrievalQA creates a new NewConversationalRetrievalQA.
No description provided by the author
NewLLMChain creates a new LLMChain with an LLM and a prompt.
No description provided by the author
NewMapReduceDocuments creates a new map reduce documents chain with some default values.
NewMapRerankDocuments creates a new map rerank documents chain.
NewRefineDocuments creates a new refine documents chain from the llm chain used to construct the initial text and the llm used to refine the text.
NewRetrievalQA creates a new RetrievalQA from a retriever and a chain for combining documents.
NewRetrievalQAFromLLM loads a question answering combine documents chain from the llm and creates a new retrievalQA chain.
No description provided by the author
No description provided by the author
NewSQLDatabaseChain creates a new SQLDatabaseChain.
NewStuffDocuments creates a new stuff documents chain with an LLM chain used after formatting the documents.
NewTransform creates a new transform chain with the function to use, the expected input and output variables.
Predict can be used to execute a chain if the chain only expects one string output.
Run can be used to execute a chain if the chain only expects one input and one string output.
WithCallback allows setting a custom Callback Handler.
WithMaxLength will add an option to set the maximum length of the generated text for LLM.Call.
WithMaxTokens is an option for LLM.Call.
WithMinLength will add an option to set the minimum length of the generated text for LLM.Call.
WithModel is an option for LLM.Call.
WithRepetitionPenalty will add an option to set the repetition penalty for sampling.
WithSeed will add an option to use deterministic sampling for LLM.Call.
No description provided by the author
WithStopWords is an option for setting the stop words for LLM.Call.
WithStreamingFunc is an option for LLM.Call that allows streaming responses.
WithTemperature is an option for LLM.Call.
WithTopK will add an option to use top-k sampling for LLM.Call.
WithTopP will add an option to use top-p sampling for LLM.Call.
# Variables
ErrChainInitialization is returned if a chain is not initialized appropriately.
No description provided by the author
ErrInputValuesWrongType is returned if an input value to a chain is of wrong type.
No description provided by the author
ErrInvalidInputValues is returned if the input values to a chain is invalid.
No description provided by the author
ErrInvalidOutputValues is returned when expected output keys to a chain does not match the actual keys in the return output values map.
ErrMemoryValuesWrongType is returned if the memory value to a chain is of wrong type.
ErrMissingInputValues is returned when some expected input values keys to a chain is missing.
ErrMissingMemoryKeyValues is returned when some expected input values keys to a chain is missing.
ErrMultipleInputsInRun is returned in the run function if the chain expects more then one input values.
ErrMultipleOutputsInPredict is returned if a chain has multiple return values in predict.
ErrMultipleOutputsInRun is returned in the run function if the chain expects more then one output values.
No description provided by the author
ErrOutputNotStringInPredict is returned if a chain does not return a string in the predict function.
ErrWrongOutputTypeInRun is returned in the run function if the chain returns a value that is not a string.
# Structs
No description provided by the author
ConditionalPromptSelector is a formatter selector that selects a prompt depending on conditionals.
No description provided by the author
No description provided by the author
No description provided by the author
ConversationalRetrievalQA chain builds on RetrievalQA to provide a chat history component.
No description provided by the author
LLMMathChain is a chain used for evaluating math expressions.
MapReduceDocuments is a chain that combines documents by mapping a chain over them, then combining the results using another chain.
No description provided by the author
No description provided by the author
RefineDocuments is a chain used for combining and processing unstructured text data.
RetrievalQA is a chain used for question-answering against a retriever.
SequentialChain is a chain that runs multiple chains in sequence, where the output of one chain is the input of the next.
SimpleSequentialChain is a chain that runs multiple chains in sequence, where the output of one chain is the input of the next.
SQLDatabaseChain is a chain used for interacting with SQL Database.
StuffDocuments is a chain that combines documents with a separator and uses the stuffed documents in an LLMChain.
Transform is a chain that runs an arbitrary function.
# Interfaces
Chain is the interface all chains must implement.
HTTPRequest http requester interface.
PromptSelector is the interface for selecting a formatter depending on the LLM given.
# Type aliases
ChainCallOption is a function that can be used to modify the behavior of the Call function.
No description provided by the author
TransformFunc is the function type that the transform chain uses.