Closed lfoppiano closed 2 days ago
I'm running promptlayer with the callback from the huggingface:
self.client = HuggingFaceEndpoint( repo_id=model_name, task="text-generation", max_new_tokens=4092, do_sample=False, temperature=0.01, repetition_penalty=1.03, callbacks=[PromptLayerCallbackHandler(pl_tags=[model_name, "genshare", "dataseer"])] )
and I'm getting cannot import name 'get_api_key' from 'promptlayer.utils' when running it using the version 1.0.6. At first glance in the utility.py the method geT_api_key is not there..
cannot import name 'get_api_key' from 'promptlayer.utils'
I've installed the following:
promptlayer 1.0.6 langchain 0.2.6 langchain-community 0.2.6 langchain-core 0.2.10 langchain-huggingface 0.0.3 langchain-openai 0.1.10 langchain-text-splitters 0.2.2
The issue is an import that should be from langchain_community.callbacks.promptlayer_callback import PromptLayerCallbackHandler
from langchain_community.callbacks.promptlayer_callback import PromptLayerCallbackHandler
I'm running promptlayer with the callback from the huggingface:
and I'm getting
cannot import name 'get_api_key' from 'promptlayer.utils'
when running it using the version 1.0.6. At first glance in the utility.py the method geT_api_key is not there..I've installed the following: