Skip to content

Commit

Permalink
Merge pull request #593 from zAlweNy26/links_added
Browse files Browse the repository at this point in the history
Added links to embedder configs
  • Loading branch information
pieroit authored Nov 30, 2023
2 parents 08ed443 + 9266c10 commit 0d2fc0b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
7 changes: 7 additions & 0 deletions core/cat/factory/embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class EmbedderFakeConfig(EmbedderSettings):
json_schema_extra = {
"humanReadableName": "Default Embedder",
"description": "Configuration for default embedder. It just outputs random numbers.",
"link": "",
}
)

Expand All @@ -46,6 +47,7 @@ class EmbedderDumbConfig(EmbedderSettings):
json_schema_extra = {
"humanReadableName": "Dumb Embedder",
"description": "Configuration for default embedder. It encodes the pairs of characters",
"link": "",
}
)

Expand All @@ -58,6 +60,7 @@ class EmbedderLlamaCppConfig(EmbedderSettings):
json_schema_extra = {
"humanReadableName": "Self-hosted llama-cpp-python embedder",
"description": "Self-hosted llama-cpp-python embedder",
"link": "",
}
)

Expand All @@ -71,6 +74,7 @@ class EmbedderOpenAIConfig(EmbedderSettings):
json_schema_extra = {
"humanReadableName": "OpenAI Embedder",
"description": "Configuration for OpenAI embeddings",
"link": "https://platform.openai.com/docs/models/overview",
}
)

Expand All @@ -90,6 +94,7 @@ class EmbedderAzureOpenAIConfig(EmbedderSettings):
json_schema_extra = {
"humanReadableName": "Azure OpenAI Embedder",
"description": "Configuration for Azure OpenAI embeddings",
"link": "https://azure.microsoft.com/en-us/products/ai-services/openai-service",
}
)

Expand All @@ -103,6 +108,7 @@ class EmbedderCohereConfig(EmbedderSettings):
json_schema_extra = {
"humanReadableName": "Cohere Embedder",
"description": "Configuration for Cohere embeddings",
"link": "https://docs.cohere.com/docs/models",
}
)

Expand All @@ -118,6 +124,7 @@ class EmbedderQdrantFastEmbedConfig(EmbedderSettings):
json_schema_extra = {
"humanReadableName": "Qdrant FastEmbed (Local)",
"description": "Configuration for Qdrant FastEmbed",
"link": "https://qdrant.github.io/fastembed/",
}
)

Expand Down
35 changes: 15 additions & 20 deletions core/cat/factory/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ class LLMDefaultConfig(LLMSettings):
"humanReadableName": "Default Language Model",
"description":
"A dumb LLM just telling that the Cat is not configured. "
"There will be a nice LLM here "
"once consumer hardware allows it.",
"link": ""
"There will be a nice LLM here once consumer hardware allows it.",
"link": "",
}
)

Expand All @@ -68,10 +67,8 @@ def get_llm_from_config(cls, config):
model_config = ConfigDict(
json_schema_extra={
"humanReadableName": "Custom LLM",
"description":
"LLM on a custom endpoint. "
"See docs for examples.",
"link": "https://cheshirecat.ai/2023/08/19/custom-large-language-model/"
"description": "LLM on a custom endpoint. See docs for examples.",
"link": "https://cheshirecat.ai/2023/08/19/custom-large-language-model/",
}
)

Expand All @@ -90,6 +87,7 @@ class LLMLlamaCppConfig(LLMSettings):
json_schema_extra={
"humanReadableName": "Self-hosted llama-cpp-python",
"description": "Self-hosted llama-cpp-python compatible LLM",
"link": "",
}
)

Expand All @@ -105,7 +103,7 @@ class LLMOpenAIChatConfig(LLMSettings):
json_schema_extra={
"humanReadableName": "OpenAI ChatGPT",
"description": "Chat model from OpenAI",
"link": "https://platform.openai.com/docs/models/overview"
"link": "https://platform.openai.com/docs/models/overview",
}
)

Expand All @@ -120,10 +118,8 @@ class LLMOpenAIConfig(LLMSettings):
model_config = ConfigDict(
json_schema_extra={
"humanReadableName": "OpenAI GPT-3",
"description":
"OpenAI GPT-3. More expensive but "
"also more flexible than ChatGPT.",
"link": "https://platform.openai.com/docs/models/overview"
"description": "OpenAI GPT-3. More expensive but also more flexible than ChatGPT.",
"link": "https://platform.openai.com/docs/models/overview",
}
)

Expand All @@ -145,7 +141,7 @@ class LLMAzureChatOpenAIConfig(LLMSettings):
json_schema_extra={
"humanReadableName": "Azure OpenAI Chat Models",
"description": "Chat model from Azure OpenAI",
"link": "https://azure.microsoft.com/en-us/products/ai-services/openai-service"
"link": "https://azure.microsoft.com/en-us/products/ai-services/openai-service",
}
)

Expand All @@ -168,7 +164,7 @@ class LLMAzureOpenAIConfig(LLMSettings):
json_schema_extra={
"humanReadableName": "Azure OpenAI Completion models",
"description": "Configuration for Cognitive Services Azure OpenAI",
"link": "https://azure.microsoft.com/en-us/products/ai-services/openai-service"
"link": "https://azure.microsoft.com/en-us/products/ai-services/openai-service",
}
)

Expand All @@ -183,7 +179,7 @@ class LLMCohereConfig(LLMSettings):
json_schema_extra={
"humanReadableName": "Cohere",
"description": "Configuration for Cohere language model",
"link": "https://docs.cohere.com/docs/models"
"link": "https://docs.cohere.com/docs/models",
}
)

Expand All @@ -203,7 +199,7 @@ class LLMHuggingFaceTextGenInferenceConfig(LLMSettings):
json_schema_extra={
"humanReadableName": "HuggingFace TextGen Inference",
"description": "Configuration for HuggingFace TextGen Inference",
"link": "https://huggingface.co/text-generation-inference"
"link": "https://huggingface.co/text-generation-inference",
}
)

Expand All @@ -218,9 +214,8 @@ class LLMHuggingFaceEndpointConfig(LLMSettings):
model_config = ConfigDict(
json_schema_extra={
"humanReadableName": "HuggingFace Endpoint",
"description":
"Configuration for HuggingFace Endpoint language models",
"link": "https://huggingface.co/inference-endpoints"
"description": "Configuration for HuggingFace Endpoint language models",
"link": "https://huggingface.co/inference-endpoints",
}
)

Expand All @@ -239,7 +234,7 @@ class LLMOllamaConfig(LLMSettings):
json_schema_extra={
"humanReadableName": "Ollama",
"description": "Configuration for Ollama",
"link": "https://ollama.ai/library"
"link": "https://ollama.ai/library",
}
)

Expand Down

0 comments on commit 0d2fc0b

Please sign in to comment.