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

Bohita plugin failed #2

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

Bohita plugin failed #2

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

Comments

@CakeCrusher
Copy link
Owner

Plugin namespace
Bohita

Error log

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  
openplugin\openplugin.py:191: in fetch_plugin
    request_out = request_chain(**llm_chain_out)
openplugin\openplugin.py:187: in request_chain
    res = self.call_api_fn(
envOpenPluginApi\lib\site-packages\langchain\chains\openai_functions\openapi.py:184: in default_call_api
    return requests.request(method, url, **_kwargs)
envOpenPluginApi\lib\site-packages\requests\api.py:59: in request
    return session.request(method=method, url=url, **kwargs)
envOpenPluginApi\lib\site-packages\requests\sessions.py:575: in request
    prep = self.prepare_request(req)
envOpenPluginApi\lib\site-packages\requests\sessions.py:486: in prepare_request
    p.prepare(
envOpenPluginApi\lib\site-packages\requests\models.py:368: in prepare
    self.prepare_url(url, params)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  

self = <PreparedRequest [POST]>, url = '//apparel', params = OrderedDict()

    def prepare_url(self, url, params):
        """Prepares the given HTTP URL."""
        #: Accept objects that have string representations.
        #: We're unable to blindly call unicode/str functions
        #: as this will include the bytestring indicator (b'')
        #: on python 3.x.
        #: https://github.com/psf/requests/pull/2238
        if isinstance(url, bytes):
            url = url.decode("utf8")
        else:
            url = str(url)

        # Remove leading whitespaces from url
        url = url.lstrip()

        # Don't do any URL preparation for non-HTTP schemes like `mailto`,
        # `data` etc to work around exceptions from `url_parse`, which
        # handles RFC 3986 only.
        if ":" in url and not url.lower().startswith("http"):
            self.url = url
            return

        # Support for unicode domain names and paths.
        try:
            scheme, auth, host, port, path, query, fragment = parse_url(url)
        except LocationParseError as e:
            raise InvalidURL(*e.args)

        if not scheme:
>           raise MissingSchema(
                f"Invalid URL {url!r}: No scheme supplied. "
                f"Perhaps you meant https://{url}?"
            )
E           requests.exceptions.MissingSchema: Invalid URL '//apparel': No scheme supplied. Perhaps you meant https:////apparel?

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

Your code (optional)

def test_initiate_and_fetch_PLUGIN():
    plugin = OpenPlugin("Bohita", verbose=True)
    assert plugin.manifest is not None
    
    # create chatgpt request that will call the addTodo function
    chatgpt_prompt = 'I want a tight fitting red shirt for a man with letters written very'
    response = plugin.fetch_plugin(
        prompt=chatgpt_prompt,
        model="gpt-3.5-turbo-0613",
        temperature=0,
    )

    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
    assert isinstance(json_content["top_stocks"], list)

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