mirror of
				https://github.com/open-webui/pipelines
				synced 2025-06-26 18:15:58 +00:00 
			
		
		
		
	chore: comments
This commit is contained in:
		
							parent
							
								
									4c21976253
								
							
						
					
					
						commit
						79fa14acbe
					
				| @ -34,10 +34,11 @@ class Pipeline: | ||||
|         # You can think of filter pipeline as a middleware that can be used to edit the form data before it is sent to the OpenAI API. | ||||
|         self.type = "filter" | ||||
| 
 | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "function_calling_blueprint" | ||||
|         # self.id = "function_calling_blueprint" | ||||
|         self.name = "Function Calling Blueprint" | ||||
| 
 | ||||
|         # Initialize valves | ||||
|  | ||||
| @ -25,10 +25,11 @@ class Pipeline: | ||||
|         # You can think of filter pipeline as a middleware that can be used to edit the form data before it is sent to the OpenAI API. | ||||
|         self.type = "filter" | ||||
| 
 | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "conversation_turn_limit_filter_pipeline" | ||||
|         # self.id = "conversation_turn_limit_filter_pipeline" | ||||
|         self.name = "Conversation Turn Limit Filter" | ||||
| 
 | ||||
|         self.valves = self.Valves( | ||||
|  | ||||
| @ -33,10 +33,10 @@ class Pipeline: | ||||
|         self.type = "filter" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "detoxify_filter_pipeline" | ||||
|         # self.id = "detoxify_filter_pipeline" | ||||
|         self.name = "Detoxify Filter" | ||||
| 
 | ||||
|         # Initialize | ||||
|  | ||||
| @ -84,7 +84,11 @@ class Pipeline(FunctionCallingBlueprint): | ||||
| 
 | ||||
|     def __init__(self): | ||||
|         super().__init__() | ||||
|         self.id = "my_tools_pipeline" | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         # self.id = "my_tools_pipeline" | ||||
|         self.name = "My Tools Pipeline" | ||||
|         self.valves = self.Valves( | ||||
|             **{ | ||||
|  | ||||
| @ -40,10 +40,10 @@ class Pipeline: | ||||
|         self.type = "filter" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "langfuse_filter_pipeline" | ||||
|         # self.id = "langfuse_filter_pipeline" | ||||
|         self.name = "Langfuse Filter" | ||||
| 
 | ||||
|         # Initialize | ||||
|  | ||||
| @ -39,10 +39,10 @@ class Pipeline: | ||||
|         self.type = "filter" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "libretranslate_filter_pipeline" | ||||
|         # self.id = "libretranslate_filter_pipeline" | ||||
|         self.name = "LibreTranslate Filter" | ||||
| 
 | ||||
|         # Initialize | ||||
|  | ||||
| @ -27,10 +27,11 @@ class Pipeline: | ||||
|         # You can think of filter pipeline as a middleware that can be used to edit the form data before it is sent to the OpenAI API. | ||||
|         self.type = "filter" | ||||
| 
 | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "rate_limit_filter_pipeline" | ||||
|         # self.id = "rate_limit_filter_pipeline" | ||||
|         self.name = "Rate Limit Filter" | ||||
| 
 | ||||
|         # Initialize rate limits | ||||
|  | ||||
| @ -9,11 +9,10 @@ from subprocess import call | ||||
| class Pipeline: | ||||
|     def __init__(self): | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
| 
 | ||||
|         self.id = "applescript_pipeline" | ||||
|         # self.id = "applescript_pipeline" | ||||
|         self.name = "AppleScript Pipeline" | ||||
|         pass | ||||
| 
 | ||||
|  | ||||
| @ -6,7 +6,10 @@ import subprocess | ||||
| class Pipeline: | ||||
|     def __init__(self): | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         self.id = "python_code_pipeline" | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         # self.id = "python_code_pipeline" | ||||
|         self.name = "Python Code Pipeline" | ||||
|         pass | ||||
| 
 | ||||
|  | ||||
| @ -10,10 +10,11 @@ class Pipeline: | ||||
|         pass | ||||
| 
 | ||||
|     def __init__(self): | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "wiki_pipeline" | ||||
|         # self.id = "wiki_pipeline" | ||||
|         self.name = "Wikipedia Pipeline" | ||||
| 
 | ||||
|         # Initialize rate limits | ||||
|  | ||||
| @ -16,10 +16,10 @@ class Pipeline: | ||||
| 
 | ||||
|     def __init__(self): | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "azure_openai_pipeline" | ||||
|         # self.id = "azure_openai_pipeline" | ||||
|         self.name = "Azure OpenAI Pipeline" | ||||
|         self.valves = self.Valves() | ||||
|         pass | ||||
|  | ||||
| @ -24,7 +24,13 @@ class Pipeline: | ||||
| 
 | ||||
|     def __init__(self): | ||||
|         self.type = "manifold" | ||||
|         self.id = "cohere" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         # self.id = "cohere" | ||||
| 
 | ||||
|         self.name = "cohere/" | ||||
| 
 | ||||
|         self.valves = self.Valves(**{"COHERE_API_KEY": os.getenv("COHERE_API_KEY")}) | ||||
|  | ||||
| @ -25,10 +25,10 @@ class Pipeline: | ||||
|         self.type = "manifold" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "litellm_manifold" | ||||
|         # self.id = "litellm_manifold" | ||||
| 
 | ||||
|         # Optionally, you can set the name of the manifold pipeline. | ||||
|         self.name = "LiteLLM: " | ||||
|  | ||||
| @ -34,10 +34,10 @@ class Pipeline: | ||||
|         self.type = "manifold" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "litellm_subprocess_manifold" | ||||
|         # self.id = "litellm_subprocess_manifold" | ||||
| 
 | ||||
|         # Optionally, you can set the name of the manifold pipeline. | ||||
|         self.name = "LiteLLM: " | ||||
|  | ||||
| @ -15,10 +15,10 @@ from schemas import OpenAIChatMessage | ||||
| class Pipeline: | ||||
|     def __init__(self): | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "llama_cpp_pipeline" | ||||
|         # self.id = "llama_cpp_pipeline" | ||||
| 
 | ||||
|         self.name = "Llama C++ Pipeline" | ||||
|         self.llm = None | ||||
|  | ||||
| @ -21,10 +21,10 @@ from huggingface_hub import login | ||||
| class Pipeline: | ||||
|     def __init__(self): | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "mlx_pipeline" | ||||
|         # self.id = "mlx_pipeline" | ||||
|         self.name = "MLX Pipeline" | ||||
|         self.host = os.getenv("MLX_HOST", "localhost") | ||||
|         self.port = os.getenv("MLX_PORT", "8080") | ||||
|  | ||||
| @ -16,10 +16,10 @@ class Pipeline: | ||||
|         self.type = "manifold" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "ollama_manifold" | ||||
|         # self.id = "ollama_manifold" | ||||
| 
 | ||||
|         # Optionally, you can set the name of the manifold pipeline. | ||||
|         self.name = "Ollama: " | ||||
|  | ||||
| @ -6,10 +6,10 @@ import requests | ||||
| class Pipeline: | ||||
|     def __init__(self): | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "ollama_pipeline" | ||||
|         # self.id = "ollama_pipeline" | ||||
|         self.name = "Ollama Pipeline" | ||||
|         pass | ||||
| 
 | ||||
|  | ||||
| @ -6,10 +6,10 @@ import requests | ||||
| class Pipeline: | ||||
|     def __init__(self): | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "openai_pipeline" | ||||
|         # self.id = "openai_pipeline" | ||||
|         self.name = "OpenAI Pipeline" | ||||
|         pass | ||||
| 
 | ||||
|  | ||||
| @ -9,12 +9,13 @@ class Pipeline: | ||||
| 
 | ||||
|     def __init__(self): | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "pipeline_example" | ||||
|         self.name = "Pipeline Example" | ||||
|         # self.id = "pipeline_example" | ||||
| 
 | ||||
|         # The name of the pipeline. | ||||
|         self.name = "Pipeline Example" | ||||
|         pass | ||||
| 
 | ||||
|     async def on_startup(self): | ||||
|  | ||||
| @ -33,10 +33,11 @@ class Pipeline: | ||||
|         self.type = "filter" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "filter_pipeline" | ||||
|         # self.id = "filter_pipeline" | ||||
| 
 | ||||
|         self.name = "Filter" | ||||
| 
 | ||||
|         self.valves = self.Valves(**{"pipelines": ["llama3:latest"]}) | ||||
|  | ||||
| @ -17,7 +17,12 @@ class Pipeline(FunctionCallingBlueprint): | ||||
| 
 | ||||
|     def __init__(self): | ||||
|         super().__init__() | ||||
|         self.id = "my_tools_pipeline" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         # self.id = "my_tools_pipeline" | ||||
|         self.name = "My Tools Pipeline" | ||||
|         self.valves = self.Valves( | ||||
|             **{ | ||||
|  | ||||
| @ -10,10 +10,10 @@ class Pipeline: | ||||
|         self.type = "manifold" | ||||
| 
 | ||||
|         # Optionally, you can set the id and name of the pipeline. | ||||
|         # Assign a unique identifier to the pipeline. | ||||
|         # Best practice is to not specify the id so that it can be automatically inferred from the filename, so that users can install multiple versions of the same pipeline. | ||||
|         # The identifier must be unique across all pipelines. | ||||
|         # The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes. | ||||
|         self.id = "manifold_pipeline" | ||||
|         # self.id = "manifold_pipeline" | ||||
| 
 | ||||
|         # Optionally, you can set the name of the manifold pipeline. | ||||
|         self.name = "Manifold: " | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user