Spaces:
Running
Running
Update crypto_analysis_agents.py
Browse files
crypto_analysis_agents.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from crewai import Agent
|
2 |
-
from langchain_together import ChatTogether
|
3 |
from langchain_huggingface import HuggingFacePipeline
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline, GenerationConfig
|
5 |
from crypto_tools import CryptoTools
|
@@ -10,15 +10,14 @@ from dotenv import load_dotenv
|
|
10 |
|
11 |
load_dotenv()
|
12 |
|
13 |
-
TOGETHER_API_KEY=os.getenv("TOGETHER_API_KEY")
|
14 |
-
|
15 |
|
16 |
class CryptoAnalysisAgents:
|
17 |
def __init__(self):
|
18 |
# Use Together AI's fast inference instead of local models
|
19 |
self.llm = Together(
|
20 |
model="meta-llama/Llama-2-7b-chat-hf", # Fast, efficient model
|
21 |
-
together_api_key=
|
22 |
temperature=0.7,
|
23 |
max_tokens=512,
|
24 |
top_p=0.9
|
|
|
1 |
from crewai import Agent
|
2 |
+
from langchain_together import ChatTogether, Together # <-- Import Together class here
|
3 |
from langchain_huggingface import HuggingFacePipeline
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline, GenerationConfig
|
5 |
from crypto_tools import CryptoTools
|
|
|
10 |
|
11 |
load_dotenv()
|
12 |
|
13 |
+
TOGETHER_API_KEY = os.getenv("TOGETHER_API_KEY")
|
|
|
14 |
|
15 |
class CryptoAnalysisAgents:
|
16 |
def __init__(self):
|
17 |
# Use Together AI's fast inference instead of local models
|
18 |
self.llm = Together(
|
19 |
model="meta-llama/Llama-2-7b-chat-hf", # Fast, efficient model
|
20 |
+
together_api_key=TOGETHER_API_KEY, # Use the loaded variable
|
21 |
temperature=0.7,
|
22 |
max_tokens=512,
|
23 |
top_p=0.9
|