feat: Update project name retrieval in LCModelComponent and CustomComponent (#3506)
Return the project name using get_project_name method in both classes.
This commit is contained in:
parent
6d048b2d2c
commit
a98e07e1a2
2 changed files with 6 additions and 1 deletions
|
|
@ -166,7 +166,7 @@ class LCModelComponent(Component):
|
|||
runnable = runnable.with_config( # type: ignore
|
||||
{
|
||||
"run_name": self.display_name,
|
||||
"project_name": self._tracing_service.project_name, # type: ignore
|
||||
"project_name": self.get_project_name(),
|
||||
"callbacks": self.get_langchain_callbacks(),
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -682,3 +682,8 @@ class Component(CustomComponent):
|
|||
from langflow.base.tools.component_tool import ComponentTool
|
||||
|
||||
return ComponentTool(component=self)
|
||||
|
||||
def get_project_name(self):
|
||||
if hasattr(self, "_tracing_service"):
|
||||
return self._tracing_service.project_name
|
||||
return "Langflow"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue