from skllm.config import SKLLMConfig
SKLLMConfig.set_openai_key("my key")
SKLLMConfig.set_azure_api_base("my url")
from skllm import ZeroShotGPTClassifier
from skllm.datasets import get_classification_dataset
X, y = get_classification_dataset()
clf = ZeroShotGPTClassifier(openai_model="azure::gpt-35-turbo")
clf.fit(X, y)
labels = clf.predict(X)
And i get this error:
1%| | 1/109 [00:27<49:23, 27.44s/it]
Could not obtain the completion after 3 retries: `APIConnectionError :: Error communicating with OpenAI: HTTPSConnectionPool(host='gen-ai-sweden.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000018D602595D0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))`
None
Could not extract the label from the completion: 'NoneType' object is not subscriptable
I am running this code:
And i get this error:
I am using openai version 0.28.0