Skip to content

Commit

Permalink
Update default provider (openai -> ogre)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilderlopes committed Nov 12, 2024
1 parent fec83d9 commit 15c1916
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions miniogre/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,8 @@ def ask_miniogre_ogre(context, question):
response = requests.post(api_server, headers=headers, json=data)

# Process the response
response_json = json.loads(response.json()['data'])
answer = response_json['response']
response_json = response.json()
answer = response_json.get('data')
except Exception as e:
print(e)
return answer
Expand Down
22 changes: 12 additions & 10 deletions miniogre/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def version():

@app.command()
def ask(question: str = "",
provider: str = "openai"):
provider: str = "ogre"):
"""
Ask
Ask question related to the project
"""

display_figlet()
Expand All @@ -46,17 +46,17 @@ def ask(question: str = "",
# Send request to API
answer = ask_miniogre(provider, context_contents, question)

print(f"Here is the answer:\n{answer}")
print(f"\nHere is the answer:\n\n{answer}")
# TODO: Save answer in Google Storage

end_emoji()

return 0

@app.command()
def readme(provider: str = "openai"):
def readme(provider: str = "ogre"):
"""
Rewrite readme
Generate README file for the project
"""

display_figlet()
Expand All @@ -77,9 +77,9 @@ def readme(provider: str = "openai"):


@app.command()
def eval(provider: str = "openai", verbose: bool = False):
def eval(provider: str = "ogre", verbose: bool = False):
"""
Determine the reproducibility score of the repository
[Beta] Determine the reproducibility score of the repository
"""

display_figlet()
Expand All @@ -97,7 +97,7 @@ def eval(provider: str = "openai", verbose: bool = False):

@app.command()
def run(
provider: str = "openai",
provider: str = "ogre",
baseimage: str = "auto",
port_map: str = "8001:8001",
dry: bool = False,
Expand Down Expand Up @@ -140,7 +140,9 @@ def run(
local_requirements = extract_requirements_from_code(
project_path, most_ext, generate_requirements, verbose
)
final_requirements = clean_requirements(provider, local_requirements)
# Remove cleaning with LLM
final_requirements = local_requirements
# final_requirements = clean_requirements(provider, local_requirements)
requirements_fullpath = save_requirements(final_requirements, ogre_dir_path)
config_bashrc(project_path, ogre_dir_path, None, None, None)
config_dockerfile(project_path, project_name, ogre_dir_path, baseimage, dry)
Expand Down Expand Up @@ -218,7 +220,7 @@ def cloud(
destination: str = "https://fileserver.ogrerun.xyz",
):
"""
Move local work to the cloud
Move local project folder to terminal in the cloud (terminal.ogre.run)
"""

display_figlet()
Expand Down

0 comments on commit 15c1916

Please sign in to comment.