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

lemonai.json #4

Closed
YuuuuuUoU opened this issue Jul 25, 2023 · 2 comments
Closed

lemonai.json #4

YuuuuuUoU opened this issue Jul 25, 2023 · 2 comments

Comments

@YuuuuuUoU
Copy link

I added lemonai.json but it doesn't work. Is there any detail to pay attention to? For example, where are the files placed

@felixbrock
Copy link
Owner

Hey, @YuuuuuUoU thanks a lot for creating the issue 🙌

The lemonai.json file needs to be placed at the project root. Also, please make sure you are following the json structure mentioned in the readme and also make sure to include the right tool names.

Simultaneously, I will run some tests on my end and get back to right away!

@felixbrock
Copy link
Owner

Just ran a very simple test. The following case worked for me. In case you are still facing issues please let me know, more than happy to help!

test.py:

import os
from lemonai import execute_workflow
from langchain import OpenAI

""" Load all relevant API Keys and Access Tokens into your environment variables """
os.environ["OPENAI_API_KEY"] = "***INSERT KEY***"

article_id = "36600966"

""" Define your instruction to be given to your LLM """
prompt = f"""
Execute the workflow 'Get my repository information' with the aticleId {article_id}.
"""

"""
Use the Lemon AI execute_workflow wrapper
to run your LangChain agent in combination with Lemon AI
"""
model = OpenAI(temperature=0)

"""
To use local server include 'server_domain' arg
with localhost address (e.g. 'server_domain='http://localhost:1313')
"""
execute_workflow(llm=model, prompt_string=prompt)

lemonai.json:

[
  {
    "name": "Get my repository information",
    "description": "Retrieve an article",
    "tools": ["hackernews-get-article"]
  }
]

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

2 participants