Spaces:
Runtime error
Runtime error
Commit
·
d7cf431
1
Parent(s):
6f5caef
updata api
Browse files
LLM.py
CHANGED
|
@@ -68,11 +68,13 @@ class openai_llm(base_llm):
|
|
| 68 |
if api_version == "":
|
| 69 |
api_version = None
|
| 70 |
self.client = AzureOpenAI(
|
|
|
|
| 71 |
azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
|
| 72 |
api_key=os.environ["AZURE_OPENAI_KEY"],
|
| 73 |
api_version= api_version
|
| 74 |
)
|
| 75 |
self.async_client = AsyncAzureOpenAI(
|
|
|
|
| 76 |
azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
|
| 77 |
api_key=os.environ["AZURE_OPENAI_KEY"],
|
| 78 |
api_version= api_version
|
|
|
|
| 68 |
if api_version == "":
|
| 69 |
api_version = None
|
| 70 |
self.client = AzureOpenAI(
|
| 71 |
+
azure_deployment= os.environ.get("AZURE_OPENAI_DEPLOYMENT",None),
|
| 72 |
azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
|
| 73 |
api_key=os.environ["AZURE_OPENAI_KEY"],
|
| 74 |
api_version= api_version
|
| 75 |
)
|
| 76 |
self.async_client = AsyncAzureOpenAI(
|
| 77 |
+
azure_deployment= os.environ.get("AZURE_OPENAI_DEPLOYMENT",None),
|
| 78 |
azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
|
| 79 |
api_key=os.environ["AZURE_OPENAI_KEY"],
|
| 80 |
api_version= api_version
|
agents.py
CHANGED
|
@@ -10,8 +10,8 @@ def get_llm(model = "gpt-4o-0806"):
|
|
| 10 |
return openai_llm(model)
|
| 11 |
|
| 12 |
def get_llms():
|
| 13 |
-
main_llm = get_llm("
|
| 14 |
-
cheap_llm = get_llm("gpt-4o-mini
|
| 15 |
return main_llm,cheap_llm
|
| 16 |
|
| 17 |
def judge_idea(i,j,idea0,idea1,topic,llm):
|
|
|
|
| 10 |
return openai_llm(model)
|
| 11 |
|
| 12 |
def get_llms():
|
| 13 |
+
main_llm = get_llm("gpt4o (08-06)")
|
| 14 |
+
cheap_llm = get_llm("gpt-4o-mini (0718)")
|
| 15 |
return main_llm,cheap_llm
|
| 16 |
|
| 17 |
def judge_idea(i,j,idea0,idea1,topic,llm):
|