-
Notifications
You must be signed in to change notification settings - Fork 15
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
DRAFT: CU-865c5pdxy AI as a language primitive via an auto-agent #15
Conversation
Looks like CI currently fails because it can't find the CIO engine in all of our targets:
|
@SerialName("presence_penalty") val presencePenalty: Double? = 0.0, | ||
@SerialName("frequency_penalty") val frequencyPenalty: Double? = 0.0, | ||
@SerialName("best_of") val bestOf: Int? = 1, | ||
@SerialName("logit_bias") val logitBias: Map<String, Int>? = emptyMap(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes don't match the OpenAPI spec IIRC? 🤔 Why did you change these defaults?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The endpoint failed when sending specific requests one at a time on each one of those fields, saying that None
was an invalid value for things like logit_bias
. I found several places like this one with similar errors openai/openai-python#288, where it states the open API docs do not match the actual expectations of the endpoints—it similarly happened with all the fields where I had to change the default value to make them work. Having accurate integration tests here that test the spec by calling the endpoints would help but there is the cost attached to calling the Open AI API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
open API docs do not match the actual expectations of the endpoints
Alright, I thought it was something like this. The OpenAPI Spec seems community build, and not official. Right?
There seems to be some other bugs, and issues with the OpenAPI spec.. 😞
Is there a way for us to add flaky integration tests, without having to pay for tokens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best path is to figure out local model loading from hugging face and the llm model that can select other llm for tasks, all those can run locally and not relly on open ai for many use cases.
@SerialName("presence_penalty") val presencePenalty: Double = 0.0, | ||
@SerialName("frequency_penalty") val frequencyPenalty: Double = 0.0, | ||
@SerialName("logit_bias") val logitBias: Map<String, Double>? = emptyMap(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem
@raulraja I did a small clean-up, and fixed the Ktor Client issues. CIO is not available for JS, but you can just use |
} | ||
|
||
suspend fun main() { | ||
val mealPlan: MealPlan = ai("Meal plan for the week for a person with gall bladder stones that includes 5 recipes.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is someone fed up with eating always the same? 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣
* Flatten structures * Improve Task and TaskResult model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If #17 is merged in I consider this good to be merged 👍
There are still some things we can improve such as turning the errors into typed errors, but we'd need to think about how we want to design the top-level APIs. I wouldn't keep this PR open much longer, it's already getting quite large.
* Improve logging, and setup example module * Fix package, split logback into TOML, and remove old reference to storage
… draft (#18) * autonomous agent in terms of `ai` function with self reasoning and agent support. Extended `ai` function to accept agents * wikipedia agent, currently failing JS node on import child_process.ExecOptions, io multiplatform solution based on https://github.com/jmfayard/kotlin-cli-starter * wikipedia agent, currently failing JS node on import child_process.ExecOptions, io multiplatform solution based on https://github.com/jmfayard/kotlin-cli-starter * Fix build --------- Co-authored-by: Simon Vergauwen <[email protected]>
* Removes duplicated import * Adds prompt capabilities
AI can generate data that automatically conforms to the serializable JSON schema of any given data type.
This DRAFT shows how this can be accomplished with an auto-ai agent that prioritizes tasks to reach an objective and returns the result in the appropriate format.
For example:
It still lacks proper retrying and better prompting, but it can already show impressive results even when data types have deeply nested properties: