gyliu513 / langX101

Apache License 2.0
6 stars 4 forks source link

Can we do not create folder in langfuse but like openai.py? #68

Closed gyliu513 closed 1 year ago

gyliu513 commented 1 year ago
## put this file renamed as 'model.py' under "site-packages/langfuse/ibm_watson_machine_learning/foundation_models" alone with 
# "__init__py" file content below:
# from .model import Model
# Use import as following:
# from langfuse.ibm_watson_machine_learning.foundation_models import Model
huang-cn commented 1 year ago

the only purpose of using folder structure is to simulate Watson import statement, by using it,

# Original import watson model without langfuse:
from ibm_watson_machine_learning.foundation_models import Model

# import langfuse watson model:
from langfuse.ibm_watson_machine_learning.foundation_models import Model

It's easy for user to remember. very similar to langfuse openai import style.
If this is our preferred way to do it, I couldn't find any good solution to get around the folder creating.

the other options would be using different import style, then we can flat it out to something like this.

from watson_ml_foundation_model import Model

but this is less intuitive, and added additional thing need to be remember.

gyliu513 commented 1 year ago

we need keep the same layout with watsonx