pull/11/head
Kye 2 years ago
parent 07cb8c96e6
commit 2a8ae76b6f

@ -53,6 +53,7 @@ class LLM:
raise raise
# example # example
from swarms.utils.llm import LLM
llm_instance = LLM(openai_api_key="your_openai_key") llm_instance = LLM(openai_api_key="your_openai_key")
result = llm_instance.run("Who won the FIFA World Cup in 1998?") result = llm_instance.run("Who won the FIFA World Cup in 1998?")
print(result) print(result)

@ -3,7 +3,7 @@ import os
from unittest.mock import patch, MagicMock from unittest.mock import patch, MagicMock
from langchain import PromptTemplate, HuggingFaceHub, ChatOpenAI, LLMChain from langchain import PromptTemplate, HuggingFaceHub, ChatOpenAI, LLMChain
from swarms.utils.LLM import LLM from swarms.utils.llm import LLM
class TestLLM(unittest.TestCase): class TestLLM(unittest.TestCase):
@patch.object(HuggingFaceHub, '__init__', return_value=None) @patch.object(HuggingFaceHub, '__init__', return_value=None)

Loading…
Cancel
Save