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

Dynamic Routes with Ollama and Llama3 #342

Open
AMIdrissi opened this issue Jul 8, 2024 · 0 comments
Open

Dynamic Routes with Ollama and Llama3 #342

AMIdrissi opened this issue Jul 8, 2024 · 0 comments

Comments

@AMIdrissi
Copy link

AMIdrissi commented Jul 8, 2024

The logger sends an error since the json output is different from what the docs say (as shown in the screenshot), despite it been correct , and while i did solve that by commenting out this block at the end of semantic_layer/llms/base.py (which is not ideal but i just wanted to test),

image

this is the Ollama llm parameter i used

llm_llama3 = OllamaLLM(name="ollama",temperature=0.1,llm_name="llama3_full")

for context i did hardcode the function_schema parameter for testing purposes this is the json object i used for it

dynamic_route_test_schema:list[dict[str, any]] = [
    {
        "type": "function",
        "function": {
        "name": "get_card",
        "description": "Finds the color of the card.\n\n :param color: the color of the card which is either 'blue' or 'silver' or 'gold' or 'platinum'.\n param function_name : the name of the function\n    :type color: str \n :type function_name: str  \n:return: The color of the card and the function name.",
        "parameters": {
            "type": "object",
            "properties": {
            "color": {
                "type": "string",
                "description":  "the color of the card which is either 'blue' or 'silver' or 'gold' or 'platinum'."
            },
            },
            "required": ["color"]
        }
        }
    }
    ]

This is the part i removed

if not self._is_valid_inputs(function_inputs, function_schemas):
        print(function_inputs)
        raise ValueError("Invalid inputs")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant