Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckTheChain plugin error #3

Open
CakeCrusher opened this issue Jul 1, 2023 · 0 comments
Open

CheckTheChain plugin error #3

CakeCrusher opened this issue Jul 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@CakeCrusher
Copy link
Owner

Plugin namespace
CheckTheChain

Error log

E           requests.exceptions.MissingSchema: Invalid URL '//api/query': No scheme supplied. Perhaps you meant https:////api/query?

envOpenPluginApi\lib\site-packages\requests\models.py:439: MissingSchema

Your code (optional)

def test_initiate_and_fetch_PLUGIN():
    plugin = OpenPlugin("CheckTheChain", verbose=True)
    assert plugin.manifest is not None

    # DELETE
    if not os.path.exists("logs"):
        os.makedirs("logs")
    with open("logs/manifest.json", "w") as f:
        f.write(json.dumps(plugin.manifest, indent=2))
    with open("logs/functions.json", "w") as f:
        f.write(json.dumps(plugin.functions, indent=2))
    
    # create chatgpt request that will call the addTodo function
    chatgpt_prompt = 'Show me the amount of nodes on the ethereum blockchain'
    response = plugin.fetch_plugin(
        prompt=chatgpt_prompt,
        model="gpt-3.5-turbo-0613",
        temperature=0,
    )

    # DELETE
    with open("logs/plugin_response.json", "w") as f:
        f.write(json.dumps(response, indent=2))

    assert response is not None
    assert response["role"] == "function"
    json_content = json.loads(response["content"])

    # Replace the line below with a test for the final output in json_content
    raise Exception("INTENTIONAL_FAILURE")

Additional context (optional)
Add any other context about the problem here, screenshots,...

@CakeCrusher CakeCrusher added the bug Something isn't working label Jul 1, 2023
@CakeCrusher CakeCrusher self-assigned this Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant