-
Notifications
You must be signed in to change notification settings - Fork 3
Add support for v29.0 #35
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR upgrades the client and spec to Typesense v29.0, enriching the OpenAPI spec with license, server details, metadata, new NL search model endpoints and components, adjusting client modules and project configuration (version bumps, CI, Docker), extending existing schemas with metadata and search enhancements, and updating tests for v29.0 compatibility. Class diagram for NLSearchModel schemas and operationsclassDiagram
class NLSearchModelBase {
+model_name: string
+api_key: string
+api_url: string
+max_bytes: integer
+temperature: number
+system_prompt: string
+top_p: number
+top_k: integer
+stop_sequences: string[]
+api_version: string
+project_id: string
+access_token: string
+refresh_token: string
+client_id: string
+client_secret: string
+region: string
+max_output_tokens: integer
+account_id: string
}
class NLSearchModelCreateSchema {
+id: string
<<extends NLSearchModelBase>>
}
class NLSearchModelSchema {
+id: string
<<extends NLSearchModelCreateSchema>>
}
class NLSearchModelUpdateSchema {
<<extends NLSearchModelCreateSchema>>
}
class NLSearchModelDeleteSchema {
+id: string
}
NLSearchModelCreateSchema <|-- NLSearchModelSchema
NLSearchModelBase <|-- NLSearchModelCreateSchema
NLSearchModelCreateSchema <|-- NLSearchModelUpdateSchema
Class diagram for extended Collection schemas with metadataclassDiagram
class CollectionSchema {
+fields: Field[]
+metadata: map
+name: string
+default_sorting_field: string
+enable_nested_fields: boolean
+symbols_to_index: string[]
+token_separators: string[]
}
class CollectionUpdateSchema {
+fields: Field[]
+metadata: map
}
class CollectionResponse {
+fields: Field[]
+metadata: map
+name: string
+num_documents: integer
+default_sorting_field: string
+enable_nested_fields: boolean
+symbols_to_index: string[]
+token_separators: string[]
}
Class diagram for Search enhancements (SearchRequestParams, SearchResultHit, MultiSearch)classDiagram
class SearchRequestParams {
+collection_name: string
+q: string
+per_page: integer
+voice_query: SearchRequestParamsVoiceQuery
}
class SearchRequestParamsVoiceQuery {
+transcribed_query: string
}
class SearchResultHit {
+hybrid_search_info: SearchResultHitHybridSearchInfo
+search_index: integer
+geo_distance_meters: SearchResultHitGeoDistanceMeters
+highlight: map
+highlights: SearchHighlight[]
+text_match: integer
+text_match_info: SearchResultHitTextMatchInfo
+vector_distance: number
}
class SearchResultHitHybridSearchInfo {
+rank_fusion_score: number
}
class MultiSearchResultItem {
+hits: SearchResultHit[]
+out_of: integer
+page: integer
+request_params: SearchRequestParams
+union_request_params: SearchRequestParams[]
+search_cutoff: boolean
+search_time_ms: integer
+conversation: SearchResultConversation
}
class SearchResult {
+hits: SearchResultHit[]
+out_of: integer
+page: integer
+request_params: SearchRequestParams
+union_request_params: SearchRequestParams[]
+search_cutoff: boolean
+search_time_ms: integer
+conversation: SearchResultConversation
}
SearchRequestParams --> SearchRequestParamsVoiceQuery
SearchResultHit --> SearchResultHitHybridSearchInfo
MultiSearchResultItem --> SearchRequestParams
MultiSearchResultItem --> SearchResultHit
SearchResult --> SearchRequestParams
SearchResult --> SearchResultHit
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @jaeyson - I've reviewed your changes - here's some feedback:
- There’s a typo in open_api.yml under externalDocs—“Typsesense” should be “Typesense.”
- The new nl_search_models tests reference a
Keysmodule without aliasing it—either alias the correct module or update the calls to useNlSearchModels. - NLSearchModelSchema only defines
id, but the API’s list/retrieve endpoints likely return the full model configuration—please extend the schema to mirror all returned fields.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- There’s a typo in open_api.yml under externalDocs—“Typsesense” should be “Typesense.”
- The new nl_search_models tests reference a `Keys` module without aliasing it—either alias the correct module or update the calls to use `NlSearchModels`.
- NLSearchModelSchema only defines `id`, but the API’s list/retrieve endpoints likely return the full model configuration—please extend the schema to mirror all returned fields.
## Individual Comments
### Comment 1
<location> `priv/open_api.yml:23` </location>
<code_context>
+ description: The port of your Typesense server
externalDocs:
- description: Find out more about Typesense
+ description: Find out more about Typsesense
url: https://typesense.org
security:
</code_context>
<issue_to_address>
Typo in 'Typsesense' should be 'Typesense'.
Please update the externalDocs description to use the correct spelling: 'Typesense'.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
externalDocs:
description: Find out more about Typsesense
url: https://typesense.org
=======
externalDocs:
description: Find out more about Typesense
url: https://typesense.org
>>>>>>> REPLACE
</suggested_fix>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
Absence of Expected Change Pattern
- open_api_typesense/lib/open_api_typesense/operations/operations.ex is usually changed with: open_api_typesense/lib/open_api_typesense/operations/collections.ex, open_api_typesense/lib/open_api_typesense/operations/debug.ex, open_api_typesense/lib/open_api_typesense/operations/override.ex, open_api_typesense/lib/open_api_typesense/operations/presets.ex, open_api_typesense/lib/open_api_typesense/operations/stopwords.ex
- open_api_typesense/lib/open_api_typesense/operations/curation.ex is usually changed with: open_api_typesense/lib/open_api_typesense/operations/debug.ex, open_api_typesense/lib/open_api_typesense/operations/stopwords.ex, open_api_typesense/lib/open_api_typesense/operations/documents.ex, open_api_typesense/lib/open_api_typesense/operations/presets.ex, open_api_typesense/lib/open_api_typesense/operations/synonyms.ex, open_api_typesense/lib/open_api_typesense/operations/override.ex
- open_api_typesense/lib/open_api_typesense/operations/analytics.ex is usually changed with: open_api_typesense/lib/open_api_typesense/operations/debug.ex, open_api_typesense/lib/open_api_typesense/operations/override.ex, open_api_typesense/lib/open_api_typesense/operations/presets.ex
- open_api_typesense/lib/open_api_typesense/operations/conversations.ex is usually changed with: open_api_typesense/lib/open_api_typesense/operations/documents.ex, open_api_typesense/lib/open_api_typesense/operations/override.ex, open_api_typesense/lib/open_api_typesense/operations/keys.ex, open_api_typesense/lib/open_api_typesense/operations/presets.ex, open_api_typesense/lib/open_api_typesense/operations/synonyms.ex
Quality Gate Profile: The Bare Minimum
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
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.
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
Absence of Expected Change Pattern
- open_api_typesense/lib/open_api_typesense/operations/operations.ex is usually changed with: open_api_typesense/lib/open_api_typesense/operations/collections.ex, open_api_typesense/lib/open_api_typesense/operations/debug.ex, open_api_typesense/lib/open_api_typesense/operations/override.ex, open_api_typesense/lib/open_api_typesense/operations/presets.ex, open_api_typesense/lib/open_api_typesense/operations/stopwords.ex
- open_api_typesense/lib/open_api_typesense/operations/curation.ex is usually changed with: open_api_typesense/lib/open_api_typesense/operations/debug.ex, open_api_typesense/lib/open_api_typesense/operations/stopwords.ex, open_api_typesense/lib/open_api_typesense/operations/documents.ex, open_api_typesense/lib/open_api_typesense/operations/presets.ex, open_api_typesense/lib/open_api_typesense/operations/synonyms.ex, open_api_typesense/lib/open_api_typesense/operations/override.ex
- open_api_typesense/lib/open_api_typesense/operations/analytics.ex is usually changed with: open_api_typesense/lib/open_api_typesense/operations/debug.ex, open_api_typesense/lib/open_api_typesense/operations/override.ex, open_api_typesense/lib/open_api_typesense/operations/presets.ex
- open_api_typesense/lib/open_api_typesense/operations/conversations.ex is usually changed with: open_api_typesense/lib/open_api_typesense/operations/documents.ex, open_api_typesense/lib/open_api_typesense/operations/override.ex, open_api_typesense/lib/open_api_typesense/operations/keys.ex, open_api_typesense/lib/open_api_typesense/operations/presets.ex, open_api_typesense/lib/open_api_typesense/operations/synonyms.ex
Quality Gate Profile: The Bare Minimum
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
Closes #34
Summary by Sourcery
Support Typesense API v29.0 by extending the spec and client with natural language search model management, search parameter enhancements (metadata, NL query, hybrid scoring, union searches), updating build and CI configurations, and upgrading version and Docker images.
New Features:
Enhancements:
Build:
Deployment:
Tests: