humansignal / adala Goto Github PK
View Code? Open in Web Editor NEWAdala: Autonomous DAta (Labeling) Agent framework
Home Page: https://humansignal.github.io/Adala/
License: Apache License 2.0
Adala: Autonomous DAta (Labeling) Agent framework
Home Page: https://humansignal.github.io/Adala/
License: Apache License 2.0
#_openai.py
DEFAULT_CREATE_COMPLETION_URL = "http://0.0.0.0:4000"
OpenAI(
api_key=self.openai_api_key,
base_url=DEFAULT_CREATE_COMPLETION_URL
)
and disable model model availability check in this mode.
Lines 44 to 49 in 7117987
The teacher_runtimes
will call OpenAIRuntime(model='gpt-4')
all the time when we new a Agent
instance like the example in Quickstart:
Lines 127 to 153 in 7117987
The problem is that when the user doesn't have access to GPT4, they can not create any Agent
for now. The raised errors like:
Requested model "gpt-4" is not available in your OpenAI account. Available models are:
...
Try to change the runtime settings for OpenAIRuntime, for example:
OpenAIRuntime(..., model="gpt-3.5-turbo")
...
---> 51 raise ValidationError(f'Requested model {self.gpt_model_name} is not available in your OpenAI account.')
TypeError: No constructor defined
Currently, Adala requires openai==0.28.1
The latest version available is 1.9.0.
Is there a plan to update openai depedencies?
Adala's and latest's openai libs version are not compatible e.g. below error occurs:
"AttributeError: module 'openai' has no attribute 'api_base'. Did you mean: 'api_type'?"
Is it possible add parameter to use claude3 and Gemini
or is possible to support litellm as proxy
I meeting this error when to run examples/classification_skill_with_CoT.ipynb
import pandas as pd
df = pd.DataFrame([
{"text": "Apple product with a sleek design.", "category": "Electronics"},
{"text": "Laptop stand for the kitchen.", "category": "Furniture/Home Decor"},
{"text": "Chocolate leather boots.", "category": "Footwear/Clothing"},
{"text": "Wooden cream for surfaces.", "category": "Furniture/Home Decor"},
{"text": "Natural finish for your lips.", "category": "Beauty/Personal Care"}
])
df
from adala.agents import Agent
from adala.skills import ClassificationSkill
agent = Agent(
skills=ClassificationSkill(
name='product_category_classification',
instructions='Categorize text into different product categories.',
input_template='Text: {text}',
output_template='Thoughts: {thoughts}\n\nClassification: {predicted_class}',
labels={'predicted_class': [
"Footwear/Clothing",
"Electronics",
"Food/Beverages",
"Furniture/Home Decor",
"Beauty/Personal Care"
]},
)
)
agent.run(df)
Applying skill: product_category_classification
60%|████████████████████████████████████ | 3/5 [00:05<00:04, 2.04s/it]
Traceback (most recent call last):
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 109, in run
await self.visit(self.parse_tree, VariableStack([self.program._variables], self))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 186, in visit
out = await self.visit(tree, variable_stack)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in visit
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 379, in visit
command_output = await command_function(*positional_args, **named_args)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/library/_select.py", line 177, in select
raise ValueError("No valid option generated in #select! Please post a GitHub issue since this should not happen :)")
ValueError: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
Error in program: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
100%|████████████████████████████████████████████████████████████| 5/5 [00:16<00:00, 4.03s/it]
Traceback (most recent call last):
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 109, in run
await self.visit(self.parse_tree, VariableStack([self.program._variables], self))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 186, in visit
out = await self.visit(tree, variable_stack)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 559, in visit
visited_children.append(await self.visit(child, variable_stack, inner_next_node, inner_next_next_node, inner_prev_node, node, parent_node))
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in visit
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 266, in
visited_children = [await self.visit(child, variable_stack, next_node, next_next_node, prev_node, node, parent_node) for child in node]
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/_program_executor.py", line 379, in visit
command_output = await command_function(*positional_args, **named_args)
File "/Users/zhaoxuefeng/opt/miniconda3/envs/adala/lib/python3.10/site-packages/guidance/library/_select.py", line 177, in select
raise ValueError("No valid option generated in #select! Please post a GitHub issue since this should not happen :)")
ValueError: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
Error in program: No valid option generated in #select! Please post a GitHub issue since this should not happen :)
🌐 Hello, amazing community!
I'm exploring the integration of two powerful libraries: MiniAutoGen and Adala, and I would greatly appreciate your help and insights!
MiniAutoGen is an innovative open-source library designed to take applications with Large Language Models (LLMs) to the next level. Its differentiators are its lightweight and flexible approach, which allows for a high degree of customization.
Here are some notable features of MiniAutoGen:
My Challenge: I'm seeking help from the community to develop new integrations and modules.
I Seek Your Help: Do you have examples, tips, or guidance on how I can accomplish this integration? Any insight or shared experience would be extremely valuable!
Check out MiniAutoGen on Google Colab: MiniAutoGen on Google Colab
And here is the GitHub repository for more information: GitHub - brunocapelao/miniAutoGen
I'm looking forward to your ideas and suggestions. Let's shape the future of AI conversations together! 🌟
I noticed that you're making async calls to OpenAI API manually in async def async_create_completion()
. Is there any reason for this instead of using the AsyncOpenAI
from the official library?
The reason I found this is because I was instrumenting our app with OpenTelemetry and OpenLLMetry just to find that async OpenAI calls from Adala are not instrumented - because OpenLLMetry expects standard openai
package calls. It would be great to stick to the official package to make this (and other) useful tricks working.
Error in executing your sample code
Very urgently needed skills in information extraction。Can this be done first?
openai always timeout or raise exception, is there a plan to support openai request timeout and retry?
I think we should be able to pass in more params when initializing an openAI LLM. For example I want to change the endpoint to point to an internal openai instance but would need to write a basically identical OpenAI Runtime class with a minor change. If we could just pass through kwargs to the guidance LLM so we support all their args that would be great. Id be happy to add the PR as well.
This is very important. Can we do this first?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.