Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- book_generator.py +2 -2
book_generator.py
CHANGED
@@ -11,9 +11,9 @@ os.environ["GROQ_API_KEY"] = "gsk_iNUzpRQsiVfo4wZqvk2vWGdyb3FYm9VeDZSjUx1Jv3uOHQ
|
|
11 |
|
12 |
# Step 4: Define helper functions for structured book generation
|
13 |
def create_book_agent(
|
14 |
-
model_name: str = "
|
15 |
temperature: float = 0.7,
|
16 |
-
max_tokens: int =
|
17 |
**kwargs
|
18 |
) -> ChatGroq:
|
19 |
"""Create a LangChain agent for book writing."""
|
|
|
11 |
|
12 |
# Step 4: Define helper functions for structured book generation
|
13 |
def create_book_agent(
|
14 |
+
model_name: str = "llama-3.1-8b-instant", # Updated model name
|
15 |
temperature: float = 0.7,
|
16 |
+
max_tokens: int = 16384, # Increased token limit
|
17 |
**kwargs
|
18 |
) -> ChatGroq:
|
19 |
"""Create a LangChain agent for book writing."""
|