mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
setting fake openai key
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import contextlib
|
import contextlib
|
||||||
import io
|
import io
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
|
|
||||||
from embedchain import App
|
from embedchain import App
|
||||||
@@ -38,6 +39,11 @@ class RAGStorage(Storage):
|
|||||||
|
|
||||||
def __init__(self, type, allow_reset=True, embedder_config=None):
|
def __init__(self, type, allow_reset=True, embedder_config=None):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
if (
|
||||||
|
not os.getenv("OPENAI_API_KEY")
|
||||||
|
and not os.getenv("OPENAI_BASE_URLl") == "https://api.openai.com/v1"
|
||||||
|
):
|
||||||
|
os.environ["OPENAI_API_KEY"] = "fake"
|
||||||
config = {
|
config = {
|
||||||
"app": {
|
"app": {
|
||||||
"config": {"name": type, "collect_metrics": False, "log_level": "ERROR"}
|
"config": {"name": type, "collect_metrics": False, "log_level": "ERROR"}
|
||||||
|
|||||||
Reference in New Issue
Block a user