Spaces:
Runtime error
Runtime error
Update crew.py
Browse files
crew.py
CHANGED
|
@@ -61,7 +61,7 @@ class NewsletterGenCrew:
|
|
| 61 |
# llm = ChatGroq(model="mixtral-8x7b-32768") # JB 13-06-2024 - geeft af en toe rate limit errors
|
| 62 |
# IN HF SPACES STREAMLIT APP: BadRequestError: Error code: 400 - {'error': {'message': 'Organization has been restricted. Please reach out to support if you believe this was in error.', 'type': 'invalid_request_error', 'code': 'organization_restricted'}}
|
| 63 |
|
| 64 |
-
|
| 65 |
|
| 66 |
# https://python.langchain.com/v0.2/docs/integrations/chat/ollama/
|
| 67 |
# supports many more optional parameters. Hover on your `ChatOllama(...)`
|
|
@@ -97,14 +97,14 @@ class NewsletterGenCrew:
|
|
| 97 |
# HuggingFaceEndpoint
|
| 98 |
# from langchain_huggingface import HuggingFaceEndpoint
|
| 99 |
#
|
| 100 |
-
llm = HuggingFaceEndpoint(
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
)
|
| 107 |
-
|
| 108 |
# API Reference:HuggingFaceEndpoint
|
| 109 |
|
| 110 |
|
|
|
|
| 61 |
# llm = ChatGroq(model="mixtral-8x7b-32768") # JB 13-06-2024 - geeft af en toe rate limit errors
|
| 62 |
# IN HF SPACES STREAMLIT APP: BadRequestError: Error code: 400 - {'error': {'message': 'Organization has been restricted. Please reach out to support if you believe this was in error.', 'type': 'invalid_request_error', 'code': 'organization_restricted'}}
|
| 63 |
|
| 64 |
+
llm = ChatGoogleGenerativeAI(google_api_key=os.getenv("GOOGLE_API_KEY"))
|
| 65 |
|
| 66 |
# https://python.langchain.com/v0.2/docs/integrations/chat/ollama/
|
| 67 |
# supports many more optional parameters. Hover on your `ChatOllama(...)`
|
|
|
|
| 97 |
# HuggingFaceEndpoint
|
| 98 |
# from langchain_huggingface import HuggingFaceEndpoint
|
| 99 |
#
|
| 100 |
+
#llm = HuggingFaceEndpoint(
|
| 101 |
+
# repo_id="meta-llama/Meta-Llama-3-70B-Instruct",
|
| 102 |
+
# task="text-generation",
|
| 103 |
+
# max_new_tokens=512,
|
| 104 |
+
# do_sample=False,
|
| 105 |
+
# repetition_penalty=1.03,
|
| 106 |
+
#)
|
| 107 |
+
# BadRequestError: (Request ID: ots-pfsrtb04xa7oVcKIc) Bad request: Model requires a Pro subscription; check out hf.co/pricing to learn more. Make sure to include your HF token in your query.
|
| 108 |
# API Reference:HuggingFaceEndpoint
|
| 109 |
|
| 110 |
|