motleycrew.common.llms
Helper functions to initialize Language Models (LLMs) from different frameworks.
Functions
|
Initialize an LLM client for use with the specified framework and family. |
|
Initialize an Anthropic LLM client for use with Langchain. |
|
Initialize an Azure OpenAI LLM client for use with Langchain. |
|
Initialize a Groq LLM client for use with Langchain. |
|
Initialize an Ollama LLM client for use with Langchain. |
|
Initialize an OpenAI LLM client for use with Langchain. |
|
Initialize a Replicate LLM client for use with Langchain. |
|
Initialize a Together LLM client for use with Langchain. |
|
Initialize an Anthropic LLM client for use with LlamaIndex. |
|
Initialize an Azure OpenAI LLM client for use with LlamaIndex. |
|
Initialize a Groq LLM client for use with LlamaIndex. |
|
Initialize an Ollama LLM client for use with LlamaIndex. |
|
Initialize an OpenAI LLM client for use with LlamaIndex. |
|
Initialize a Replicate LLM client for use with LlamaIndex. |
|
Initialize a Together LLM client for use with LlamaIndex. |
- motleycrew.common.llms.langchain_openai_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize an OpenAI LLM client for use with Langchain.
- Parameters:
llm_name – Name of the LLM in OpenAI API.
- motleycrew.common.llms.llama_index_openai_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize an OpenAI LLM client for use with LlamaIndex.
- Parameters:
llm_name – Name of the LLM in OpenAI API.
- motleycrew.common.llms.langchain_anthropic_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize an Anthropic LLM client for use with Langchain.
- Parameters:
llm_name – Name of the LLM in Anthropic API.
- motleycrew.common.llms.llama_index_anthropic_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize an Anthropic LLM client for use with LlamaIndex.
- Parameters:
llm_name – Name of the LLM in Anthropic API.
- motleycrew.common.llms.langchain_replicate_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize a Replicate LLM client for use with Langchain.
- Parameters:
llm_name – Name of the LLM in Replicate API.
- motleycrew.common.llms.llama_index_replicate_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize a Replicate LLM client for use with LlamaIndex.
- Parameters:
llm_name – Name of the LLM in Replicate API.
- motleycrew.common.llms.langchain_together_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize a Together LLM client for use with Langchain.
- Parameters:
llm_name – Name of the LLM in Together API.
- motleycrew.common.llms.llama_index_together_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize a Together LLM client for use with LlamaIndex.
- Parameters:
llm_name – Name of the LLM in Together API.
- motleycrew.common.llms.langchain_groq_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize a Groq LLM client for use with Langchain.
- Parameters:
llm_name – Name of the LLM in Groq API.
- motleycrew.common.llms.llama_index_groq_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize a Groq LLM client for use with LlamaIndex.
- Parameters:
llm_name – Name of the LLM in Groq API.
- motleycrew.common.llms.langchain_ollama_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize an Ollama LLM client for use with Langchain.
- Parameters:
llm_name – Name of the LLM in Ollama API.
- motleycrew.common.llms.llama_index_ollama_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize an Ollama LLM client for use with LlamaIndex.
- Parameters:
llm_name – Name of the LLM in Ollama API.
- motleycrew.common.llms.langchain_azure_openai_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize an Azure OpenAI LLM client for use with Langchain.
- Parameters:
llm_name – Name of the LLM in Azure OpenAI API.
- motleycrew.common.llms.llama_index_azure_openai_llm(llm_name: str = 'gpt-4.1', **kwargs)
Initialize an Azure OpenAI LLM client for use with LlamaIndex.
- Parameters:
llm_name – Name of the LLM in Azure OpenAI API.
- motleycrew.common.llms.init_llm(llm_framework: str, llm_provider: str | None = None, llm_name: str | None = None, **kwargs)
Initialize an LLM client for use with the specified framework and family.
- Parameters:
llm_framework – Framework of the LLM client.
llm_provider – Provider of the LLM.
llm_name – Name of the LLM.